Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[11.17] Laravel attempts to load attributes it didn't previously #52279

Closed
dwightwatson opened this issue Jul 26, 2024 · 1 comment
Closed

[11.17] Laravel attempts to load attributes it didn't previously #52279

dwightwatson opened this issue Jul 26, 2024 · 1 comment
Labels

Comments

@dwightwatson
Copy link
Contributor

Laravel Version

11.17

PHP Version

8.3.9

Database Driver & Version

No response

Description

After upgrading from 11.16 to 11.17 I started getting errors in production: Attribute class "Knuckles\Scribe\Attributes\Group" not found.

I use scribe to generate API documentation. scribe is installed a a development dependency because the documentation is built during CI/CD.

Tests still passed because scribe is available during tests, but once this was in production it blew up.

Laravel 11.16 did not attempt to load these controller attributes, but now does.

This is a breaking change that unfortunately flew under the radar for me. Should this be expected behaviour going forward? (I can make scribe a regular dependency to get around this, but wanted to be sure).

Relevant PR: #52167

use Knuckles\Scribe\Attributes\Group;


#[Group('Feeds', <<<'DESC'
Endpoints that return currently available listings that can be listed on other sites with permission.
DESC)]
class RoomController extends Controller
{
    //
}

Steps To Reproduce

Add an attribute that doesn't exist/is not available to a controller.

#[Laravel\InteractsWithLambo]
class PagesController extends Controller
{
    //
}

This will do nothing on Laravel 11.16, but blow up on Laravel 11.17.

@crynobone crynobone added the bug label Jul 26, 2024
@driesvints
Copy link
Member

heya thanks. we reverted the causing PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants