Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 4 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ cache:
- $HOME/.composer/cache/files
- $HOME/symfony-bridge/.phpunit

services:
- mysql

env:
global:
- PHPUNIT_FLAGS="-v"
Expand All @@ -13,30 +16,14 @@ env:
matrix:
fast_finish: true
include:
- php: 7.1
- php: 7.2
- php: 7.3
- php: 7.1
env: MAKER_TEST_VERSION=stable-dev
- php: 7.1
env: MAKER_TEST_VERSION=dev

# the following need to be refactored properly into allow_failures
# allow_failures:
# # low deps is still a WIP
# - php: 7.1
# env: deps=low
# # Dev-master is allowed to fail.
# - env: STABILITY="dev"

before_install:
- if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi;
- |
if [[ $deps = low ]]; then
composer update --prefer-lowest
else
composer update
fi
- composer update

install:
- ./vendor/bin/simple-phpunit install
Expand Down
8 changes: 6 additions & 2 deletions src/Test/MakerTestEnvironment.php
Original file line number Diff line number Diff line change
Expand Up @@ -439,12 +439,16 @@ private function getTargetFlexVersion(): string
$version = $data['latest'];
$parts = explode('.', $version);

return sprintf('%s.%s.x-dev', $parts[0], $parts[1]);
$this->targetFlexVersion = sprintf('%s.%s.x-dev', $parts[0], $parts[1]);

break;
case 'dev':
$version = $data['dev'];
$parts = explode('.', $version);

return sprintf('%s.%s.x-dev', $parts[0], $parts[1]);
$this->targetFlexVersion = sprintf('%s.%s.x-dev', $parts[0], $parts[1]);

break;
default:
throw new \Exception('Invalid target version');
}
Expand Down
5 changes: 4 additions & 1 deletion src/Util/ComposerAutoloaderFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

use Composer\Autoload\ClassLoader;
use Symfony\Component\Debug\DebugClassLoader;
use Symfony\Component\ErrorHandler\DebugClassLoader as ErrorHandlerDebugClassLoader;

/**
* @internal
Expand Down Expand Up @@ -78,7 +79,9 @@ private function extractComposerClassLoader(array $autoloader)
if ($autoloader[0] instanceof ClassLoader) {
return $autoloader[0];
}
if ($autoloader[0] instanceof DebugClassLoader
if (
($autoloader[0] instanceof DebugClassLoader
|| $autoloader[0] instanceof ErrorHandlerDebugClassLoader)
&& \is_array($autoloader[0]->getClassLoader())
&& $autoloader[0]->getClassLoader()[0] instanceof ClassLoader) {
return $autoloader[0]->getClassLoader()[0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Symfony\Bundle\MakerBundle\Tests\tmp\current_project_xml\src\Entity\UserXml;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Symfony\Bridge\Doctrine\RegistryInterface;
use Doctrine\Common\Persistence\ManagerRegistry;

/**
* @method UserXml|null find($id, $lockMode = null, $lockVersion = null)
Expand All @@ -14,7 +14,7 @@
*/
class UserRepository extends ServiceEntityRepository
{
public function __construct(RegistryInterface $registry)
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, UserXml::class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Symfony\Bundle\MakerBundle\Tests\tmp\current_project_xml\src\Entity\XOther;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Symfony\Bridge\Doctrine\RegistryInterface;
use Doctrine\Common\Persistence\ManagerRegistry;

/**
* @method XOther|null find($id, $lockMode = null, $lockVersion = null)
Expand All @@ -14,7 +14,7 @@
*/
class XOtherRepository extends ServiceEntityRepository
{
public function __construct(RegistryInterface $registry)
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, XOther::class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use App\Entity\SweetFood;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Symfony\Bridge\Doctrine\RegistryInterface;
use Doctrine\Common\Persistence\ManagerRegistry;

/**
* @method SweetFood|null find($id, $lockMode = null, $lockVersion = null)
Expand All @@ -14,7 +14,7 @@
*/
class SweetFoodRepository extends ServiceEntityRepository
{
public function __construct(RegistryInterface $registry)
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, SweetFood::class);
}
Expand Down