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

Move logic out of Swagger::__construct() #454

Closed
cnizzardini opened this issue Aug 24, 2022 · 1 comment
Closed

Move logic out of Swagger::__construct() #454

cnizzardini opened this issue Aug 24, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@cnizzardini
Copy link
Owner

cnizzardini commented Aug 24, 2022

See notes from #453

Even when hotReload is disabled a full controller and model scan is performed + any userland events will fire. Attempt backporting to 2.x.

If you have expensive event listeners you can do a work around like this:

public function schemaCreated(Event $event): void
{
    if (PHP_SAPI === 'cli' || Configure::read('SwaggerBake.hotReload')) {
        // event will only run in CLI or when hot reload is enabled
    }
}

For expensive controller & model scans there is no workaround.

@cnizzardini cnizzardini added the enhancement New feature or request label Aug 24, 2022
@cnizzardini cnizzardini modified the milestone: v2.4.4 Aug 24, 2022
@cnizzardini cnizzardini added this to the v3.0.0 milestone Sep 4, 2022
cnizzardini added a commit that referenced this issue Sep 17, 2022
* Move openapi build logic out of constructor #454

* set phptsan to version ^1.8.5 to resolve false-positives

* update readme
@cnizzardini
Copy link
Owner Author

There will be no backport to 2.x, this has been resolved in the yet-to-be-released v3.0.0.

@cnizzardini cnizzardini self-assigned this Sep 17, 2022
cnizzardini added a commit that referenced this issue Jan 11, 2024
* initial version 3 branch

* Remove deprecated code (#426)

Removes all methods, properties etc. and related documentation that was marked deprecated in 2.x

* WIP

* convert attribute properties to readonly where possible + phpstan fixes

* add constant

* doc updates

* update docs

* Move openapi build logic out of constructor (#469)

* Move openapi build logic out of constructor #454

* set phptsan to version ^1.8.5 to resolve false-positives

* update readme

* Conditional pretty print #472

* Resolve deprecations and notices (#470)

* Resolves notices
* Reduce cyclomatic compexity
* Remove non-executed code and increase coverage for Commands
* Replace depreacted Router::scope with RouteBuilder->scope
* Update github action descriptions

* merge v2.5 into v3 (#483)

* add php 8.2 ci matrix

* Fixture Upgrade for cake 5 compat.

* cleanup test bootstrap file

* fixes broken tests

* debug

* debug

* debug

* debug

* debug

* Support CakePHP 5 dev branch (#516)

Adds support for cakephp 5 and other necessary dependencies.

* Require CakePHP 5 for version 3 (#530)

* Merge master to v3 (#532)

Merge v2.5.8 changes

* update deps and fix static analysis warnings (#535)

* small readme updates

* upgrade to latest swaggerui and redocly

---------

Co-authored-by: Chris Nizzardini <chris.nizzardini@thecmigroupa.ca>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant