Skip to content

ignore api_platform.state.item_provider when Doctrine is not enabled#4954

Merged
soyuka merged 1 commit into
api-platform:mainfrom
dgoosens:patch-1
Sep 17, 2022
Merged

ignore api_platform.state.item_provider when Doctrine is not enabled#4954
soyuka merged 1 commit into
api-platform:mainfrom
dgoosens:patch-1

Conversation

@dgoosens

@dgoosens dgoosens commented Sep 15, 2022

Copy link
Copy Markdown
Contributor
Q A
Branch? main
Tickets none
License MIT
Doc PR

hi,

Similar to api-platform/api-platform#1265

Getting:

bin/console cache:clear
# ...
Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 1
!!  
!!  In CheckExceptionOnInvalidReferenceBehaviorPass.php line 86:
!!                                                                                 
!!    The service "ApiPlatform\State\CreateProvider" has a dependency on a non-ex  
!!    istent service "api_platform.state.item_provider".                           
!!                                                                                 
!!  
!!  
Script @auto-scripts was called via post-update-cmd

after upgrade to 3.0
manually removing the cache did not help

state.xml defines a non existing dependency when neither Doctrine, Doctrine-MongoDb or Elastic are enabled

Adding the on-invalid="ignore" solves the unmatched dependency

hi,

Similar to <api-platform/api-platform#1265>  

Getting:

``` 
bin/console cache:clear
# ...
Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 1
!!  
!!  In CheckExceptionOnInvalidReferenceBehaviorPass.php line 86:
!!                                                                                 
!!    The service "ApiPlatform\State\CreateProvider" has a dependency on a non-ex  
!!    istent service "api_platform.state.item_provider".                           
!!                                                                                 
!!  
!!  
Script @auto-scripts was called via post-update-cmd
``` 

after upgrade to `3.0` 
manually removing the cache did not help

`state.xml` defines a non existing dependency when neither Doctrine, Doctrine-MongoDb or Elastic are enabled

Adding the `on-invalid="ignore"` solves the unmatched dependency
@soyuka
soyuka merged commit db380b7 into api-platform:main Sep 17, 2022
@soyuka

soyuka commented Sep 17, 2022

Copy link
Copy Markdown
Member

thanks

@chalasr

chalasr commented Sep 25, 2022

Copy link
Copy Markdown
Contributor

Shouldn't this be backported to 3.0?

soyuka pushed a commit that referenced this pull request Sep 29, 2022
* ignore api_platform.state.item_provider when Doctrine is not enabled (#4954)

* fix(symfony): metadata cache is broken in dev/prod

Co-authored-by: Dmitri Goosens <1250047+dgoosens@users.noreply.github.com>
@temp

temp commented Oct 4, 2022

Copy link
Copy Markdown

3.0.1 is been released without this fix. It is still unusable for users that do not use Doctrine...

@dgoosens
dgoosens deleted the patch-1 branch October 4, 2022 14:23
@dgoosens

dgoosens commented Oct 4, 2022

Copy link
Copy Markdown
Contributor Author

any chance to get this included in 3.0.1 as @chalasr suggested ?
AFAIK this is not a breaking change, more a correction of a regression...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants