Can't find the config/packages/api_platform.yaml on Symfony 6 - api-platform.com

After installing the API platform on my Symfony 6.2 project using the composer command composer require API
I can't find the api_platform.yaml file in config/packages folders, the only file related to API-PLATFORM I found is on the routes directory
Is this a new update? Or should I add it in a certain way?

Go to
config/packages/
Create
api_platform.yaml
Add your configuration
api_platform:
title: 'MY API'
Restart the Symfony Dev Server
symfony server:stop
symfony server:start
Check https://localhost:8000/api/docs to see the results.

Related

after Update laravel 6.2 [App\Http\Controllers\Auth\ConfirmPasswordController] does not exist

I update laravel from v 6.0 to v6.2 and after the finish, I try php artisan route:list
This error
I had the same issue, i fixed it with the following solution:
Create a empty file named "ConfirmPasswordController.php" in the folder App/Http/Controllers/Auth
Go to https://github.com/laravel/laravel/tree/master/app/Http/Controllers/Auth en open the file named "ConfirmPasswordController.php"
Copy all the file contents to your newly created file and save it.
This should fix the error.
Edit
The problem is, were updating the composer dependencies, but not the core application. But de composer dependencies expect you to update the core. They refer to files on the core application that not exists (because the application is not up-to-date).
See: How to update Laravel Application (not the composer dependencies)
This has been fixed. Just update to Laravel 6.4
Step1. Create ConfirmPasswordController.php file in app/Http/Controllers/Auth/ path.
Step2. ConfirmPasswordController.php paste this content to ConfirmPasswordController.php file.
From v6.0.0 to v6.2.0 the following addition and modifications were made.
Added app/Http/Controllers/Auth/ConfirmPasswordController.php
Modified app/Http/Controllers/Auth/ForgotPasswordController.php
Modified app/Http/Controllers/Auth/ResetPasswordController.php
Modified app/Http/Kernel.php
Modified config/auth.php
Modified resources/lang/en/validation.php
You can see the diff of v6.0.0 to v6.2.0 here.
Create ConfirmPasswordController.php manually and It's may be duplicate of - duplicate
1 ) Open file vender/laravel/framework/src/Illuminate/Routing/Router.php".
2 ) and comment these
// $this->get('password/confirm', 'Auth\ConfirmPasswordController#showConfirmForm')->name('password.confirm');
// $this->post('password/confirm', 'Auth\ConfirmPasswordController#confirm');

Unable to generate resources using laravel-code-generator in Laravel 5.8

I created a fresh Laravel project v5.8. Then installed the latest version of the Laravel Code Generator (2.3) but I'm unable to generate resources. I've read your release notes for 2.3 and I'm not seeing where I'm making a mistake on the installation or the commands I keep the output below:
php artisan create:scaffold Test generates the output below:
Exception : The file
resources/laravel-code-generator/sources/tests.json was not found!
at /Users/Sites/Laravel/lms/vendor/crestapps/laravel-code-generator/src/Models/Resource.php:686
682| {
683| $fileFullname = Config::getResourceFilePath($filename);
684|
685| if (!File::exists($fileFullname)) {
> 686| throw new Exception('The file ' . $fileFullname . ' was not found!');
687| }
688|
689| return File::get($fileFullname);
690| }
Exception trace:
1 CrestApps\CodeGenerator\Models\Resource::jsonFileContent("tests.json")
/Users/Sites/Laravel/lms/vendor/crestapps/laravel-code-generator/src/Models/Resource.php:549
2 CrestApps\CodeGenerator\Models\Resource::fromFile("tests.json", "CrestApps")
/Users/Sites/Laravel/lms/vendor/crestapps/laravel-code-generator/src/Commands/Framework/CreateScaffoldCommand.php:70
Please use the argument -v to see more details.
I'm getting a similar output when trying to create resources from a database table. I'm using the php artisan resource-file:from-database [model-name] command.
I read online that it may have to do with the Laravel storage folder not having the correct permissions but I've tried that and it didn't work. Cleared and config the cache, composer dump-autoload, etc... But nothing has worked.
I'm also noticing that the generator does not publish the configuration file on your sample video on your website. I have tried to publish the config file using the vendor:publish command but it generates a somewhat empty file, only has this option: 'files_upload_path' => 'uploads'. The folder for the generator located inside the resources folder does not contain a config file.

Auth guard driver [api] is not defined?

I use this library jwt-auth-guard in Laravel 5.3.
When I try open page I get error:
InvalidArgumentException in AuthManager.php line 99:
Auth guard driver [api] is not defined.
How can I fix it? I made everything that was need
I'm not sure, please check you guard driver setup into config/auth.php first. You can cross check this from GIT repo.
Let me know if any concern from above.
If you are using tymondesigns/jwt-auth package first check that you are downloading the latest version (1.0.0-rc.2 for this time) or you can just update your composer
composer update
and also delete your old jwt file from config folder and publish again also run!
php artisan jwt:secret

CodeIgniter 3 - library replacement

Tried to implement Monolog into a CodeIgniter 3 base installation, and implemented as per the instructions here: https://github.com/stevethomas/codeigniter-monolog, but for some reason CI 3 does not replace the built-in system CI_Log library. I have done the following:
Installed Monolog via Composer.
Copied monolog.php and Log.php as per instructions to config and libraries respectively.
Added the Composer autoload instruction to my CI index.php file; the autoloader is being called, but the library is not initialized.
Expected result: Use Monolog instead of native CI logging.
Result observed: CI used built in CI logging.
What am I missing?
See http://www.codeigniter.com/user_guide/general/core_classes.html#replacing-core-classes
You must put it in application/core directory.
And about Composer autoloader. CI 3 has its config $config['composer_autoload'].
See http://www.codeigniter.com/user_guide/general/autoloader.html

API Class not found using Composer

I am new to using composer, I have it installed, created composer.json file. Installed bigcommerce api using these instructions: https://github.com/bigcommerce/bigcommerce-api-php
When I try to run "use Bigcommerce\Api\Client as Bigcommerce" I am getting error class not found.
I am using localhost and my file structure is:
testsite
src-> contains all classes including Client.php
vendor -> bigcommerce -> api -> the api files,
api.php -> my test file trying to connect to api
I have not changed any composer files, I have looked into autoloading. As I said before it is first time using composer.
Please read the documentation of Composer here: https://getcomposer.org/doc/00-intro.md Pay attention to the last couple of paragraphs, "Using Composer" and "Autoloading". Did you follow the procedures in your code?

Resources