Skip to content

Commit

Permalink
Merge pull request #746 from malarzm/composer-plugins
Browse files Browse the repository at this point in the history
Explicit allow for composer plugins
  • Loading branch information
malarzm authored Sep 18, 2022
2 parents f5ca283 + 6e2fc50 commit c1c31fa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
ini-values: "zend.assertions=1"

- name: "Globally install symfony/flex"
run: "composer global require --no-progress --no-scripts --no-plugins symfony/flex"
run: "composer global require --no-progress --no-scripts --no-plugins symfony/flex && composer global config --no-plugins allow-plugins.symfony/flex true"

- name: "Set minimum-stability to stable in Composer"
run: "composer config minimum-stability ${{ matrix.stability }}"
Expand Down
3 changes: 2 additions & 1 deletion Repository/ContainerRepositoryFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/
final class ContainerRepositoryFactory implements RepositoryFactory
{
/** @var ObjectRepository[] */
/** @var array<string, ObjectRepository> */
private $managedRepositories = [];

/** @var ContainerInterface|null */
Expand Down Expand Up @@ -89,6 +89,7 @@ private function getOrCreateRepository(DocumentManager $documentManager, ClassMe
{
$repositoryHash = $metadata->getName() . spl_object_hash($documentManager);
if (isset($this->managedRepositories[$repositoryHash])) {
/** @psalm-var ObjectRepository<T> */
return $this->managedRepositories[$repositoryHash];
}

Expand Down
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@
}
},
"config": {
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}

0 comments on commit c1c31fa

Please sign in to comment.