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?
Related
Laravel launchs a security release. I'm using Laravel 6.18.12 and trying to update to 6.18.29, so when I updated my composer.json file with "laravel/framework": "^6.18.29" I take this error:
Reading about it in stackoverflow I see that people that installed the doctrine/inflector at 1.4 fixed their problems. So I did it: composer install doctrine/inflector:1.4 and try update again the laravel with composer update laravel/framework but a new error happened:
Them I installed also the symfony/polyfill-php7.3 (I'm using PHP 7.3). Done that I could update the Laravel version, but I'm always getting this error 401 once I try to get my api data:
This happens to all my api requests. Looks like something about the auth:api middleware, but I'm not sure why. My user is logged in the web, I can use auth() stuff, but the api looks like the user isn't authenticated. Everything was working as fine before this update.
Ps: I'm not using passport, but I'm using spark alongside my project.
As I thought, this Laravel patch has to been solved also in the Spark, so now I'm updating to the newest version. For further information: Taylor answer
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.
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 was developing REST API's in Laravel5 and now I am moving same project to Lumen due to speed issue.
The problem is,I am using "vsmoraes/laravel-pdf": "1.0.1" in Laravel,Now I want to use the same in Lumen.
How it is possible?
When I am added via composer and trying to access from controller,I am getting following error ,
BindingResolutionException in Container.php line 785:
Target [Vsmoraes\Pdf\Pdf] is not instantiable.
Any idea?
Lumen is a micro-framework based on Laravel. As of that, Lumen does not have all the Laravel featuers (by default).
Most of the packages will have to be updated, so they will have much less Laravel-specific dependencies than they're having now.
I'm trying to develop a custom package using "workbench". It's a simple package that will create a repository to consume a different API we have. I plan on injecting this repository into my controllers of my application. Anyway, I created the package using "workbench". This creates the service provider. The Laravel docs say to add the service provider to my "providers" array in app.config. I've done this, but when I run composer update, I get an error saying that the class is not found, specifically: PHP Fatal error: Class 'MyVendor\MyPackage\ServiceProvider not found in /.. .. .. ../laravel/vendor/framework/src/Illuminate/Foundation/ProviderRepository.php. I thought I followed the docs correctly, what am I missing?
Simply running composer install inside the workbench directory resolves this issue.