Skip to content

Commit

Permalink
ci: fix guides database removal
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka committed Apr 15, 2024
1 parent f3c0b01 commit 6aed9e5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/guides.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ jobs:
KERNEL_CLASS: \ApiPlatform\Playground\Kernel
run: |
for d in guides/*.php; do
rm -f var/data.db
echo "Testing guide $d"
pdg-phpunit $d || exit 1
rm -f var/*.db
echo "Testing guide $d"
pdg-phpunit $d || exit 1
exit_status=$?
if [ $exit_status -ne 0 ]; then
exit $exit_status
fi
done
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ final class AttributeFilterPass implements CompilerPassInterface
public function process(ContainerBuilder $container): void
{
foreach (get_declared_classes() as $class) {
$this->createFilterDefinitions(new \ReflectionClass($class), $container);
$r = new \ReflectionClass($class);
if (str_contains((string) $r->getFileName(), 'guides')) {
$this->createFilterDefinitions($r, $container);
}
}
}

Expand Down

0 comments on commit 6aed9e5

Please sign in to comment.