* Add new config node disable_default_routes to prevent registering RouteDescriber to specific areas which allowes disabling rendering of default routes, Adjust tests accordingly
* Add documentation for new config variable
* Change disable_default_routes to filter route collection instead of disabling route describer, Add test for new handling in FilteredRouteCollectionBuilder
* Change naming of matching method for disabling default routes
* Fix codestyle issue
* Fix codestyle issue
* Change naming of dataProvider to match testing name
Co-authored-by: Frederik Holz <team-orange@auxmoney.com>
*Context*: NelmioApiDocBundle does not require clients to have the symfony/validator package. However it requires it in its dev dependencies.
*Problem*: If client of library does not have symfony/validator and uses PHP8, NelmioApiDocBundle will assume that symfony/validator is installed, in `SymfonyConstraintAnnotationReader.php`
*Solution*: We should not assume that client has symfony/validator. So before reading attributes of this class, we now try to see if class exists.
- Tests still run.
- Tested in a project without symfony/validator and requiring this version, it now works.
The error before this fix was :
Exception: `ClassNotFound`
Message for me: `Attempted to load class "Constraint" from namespace "Symfony\Component\Validator".
Did you forget a "use" statement for e.g. "JsonSchema\Constraints\Constraint" or "Doctrine\DBAL\Schema\Constraint"?`
`swagger-ui-bundle` is very sensible to encoding changes because of the
RegExp performed.
ensuring UTF-8 on the response prevents end-user config to break it.
the annotations already needs to be UTF-8 compatible to generate the
JSON, so it should not break users applications.
By default the PHP configuration routes returns an array with the controller name and method, since the reflection class was typed for string only this was causing an exception when the user was not using YAML or XML configuration.
This changes removes the string type hint from the method and checks if it's an array or string to do the reflection.
Co-authored-by: Adir Kuhn <adir@123inkt.nl>
* remove pattern added from the Expression Violation message.
This string confuses the API client showing a violation message instead of having a Regex. Any informatory message for the client should be placed in "description"
* fix tests
* fix typo