So I am currently using 2.* within my JSON composer file but when I try to change it to #dev to get the latest update Slim 3, I get an error on my application. "Fatal error: Class 'Slim\Slim' not found".
Why can my app no longer find the namespace of Slim?
You can't just update a Slim 2 app to Slim 3 using composer.
Slim 3 is a lot different from Slim 2.
The Slim namespace is still there but the class isn't called Slim anymore.
It's \Slim\App.
Read the docs at: http://slimframework.com/docs/ (for Slim 3) and you'll see that there are many many breaking changes.
Related
Transferred an old CakePHP project to a new server to do some testing ( i don't have access to it's original server) . It's cakePHP 2.7 running on php 5.5. The project was originally built using PEAR, I've managed to install PEAR after a lot of issues with deprecated packages, but am unable to run the build.xml as it requires a package that is deprecated and I am unable to find anywhere. Fixed most of the path & redirect issues. But can't get it to find any Classes; not even App, as i have no idea where this is defined. Is it defined by PEAR? it doesn't seem to be in core.php or bootstrap.php or the initial index.php. Or if it is I can't find it.
so:
Any file that has App class for example:
App::objects('Controller');
returns:
Fatal error: Class 'App' not found in D:\xampp\htdocs\projectname\cake\app\webroot\test.php on line 2
hoping someone out there still has knowledge of cakePHP 2!
I'm currently developing a set of packages/service providers to use as a sort of boilerplate for new web applications. I started developing some time ago and I never ran the packages through composer.
After I made a repository and added the package to a new Laravel application, it installed just fine, until it ran php artisan package:discover. The error was:
In breadcrumbs.php line 5:
Class 'Athena' not found
and it refers to this line:
Breadcrumbs::register( \Athena::getFacadeRoot()->route_name_prefix . '.dashboard.show', function ( $breadcrumbs ) {
in which \Athena:: is a facade within the package. I fixed the issue by adding the facade to the app.php file. The idea was to bootstrap applications easily, so my question is:
Can I use a facade within a package and still use the Laravel package discovery, without having to edit files when I create a new project?
I am trying to deploy a Yii2 app that consumes OData services. But I am having a bit problem: I choose https://github.com/saintsystems/odata-client-php (OData Client library from SaintSystems), I installed with composer and there was no complain. But when I use instantiate the objects it says:
$odataClient = new ODataClient($odataServiceUrl);
Then
Error
Class 'app\controllers\ODataClient' not found
And if
$odataClient = new \SaintSystems\OData\ODataClient($odataServiceUrl);
Then it complains with:
Call to undefined method SaintSystems\OData\Query\Builder::post()
So I think Yii 2 is not recognizing the namespaces or composer does not set them up correctly. How could I make yii2 take this namespace and I deploy successfully with this library.
Thank you all!
A colleague of mine is having an issue trying to get a Lumen module working for Codeception. He has added some notes here:
https://laracasts.com/discuss/channels/lumen/codeception-lumen-module
He is trying to create a Lumen module for Codeception based on the Laravel5 module, without success. Laravel implements an HttpKernel but Lumen does not, it appears that the http kernel translates Laravel's requests for codeception tests, so attempting to run the tests without initializing the http kernel doesn't work.
It may be the case that we need to use the Symfony Http\Kernel rather than the Laravel one, in which case how do we initialize that kernel module from codeception?
Has anyone else done any work towards getting Codeception tests running with Lumen?
I've forked that current project and I believe I may have a working copy of this package.
https://github.com/jerairrest/codeception-lumen
Take a gander. I've also put in for a pull request but I haven't got a response from the original maintainer.
Cheers!
Jer
I am trying to have a type=xml/json on the response of my API.
I am using the laravel 4 framework and I was trying to look for such library.
I found jmsyst.com/libs/serializer but I cant make it work for laravel so I continued to look for another that can be easily added to laravel 4, So I finally found github.com/SoapBox/laravel-formatter.
I installed it into laravel with composer as "hitsend/laravel-formatter": "dev-master"
All went well and I went ahead to add the provider on the config/app.php
'SoapBox\Formatter\FormatterServiceProvider',
But laravel now returns the error:
Class 'SoapBox\Formatter\FormatterServiceProvider' not found
I tried to check my autoload_namespaces.php and saw that hitsend is there.
Why is it not detected the provider?