Merge branch '4.3' into 4.4
* 4.3: Fixing bug where PropertyInfoLoader tried to add validation to non-existent properties [TwigBundle] fix tests [travis] increase concurrency
This commit is contained in:
commit
3bef037b7b
@ -243,12 +243,12 @@ install:
|
|||||||
tfold 'composer update' $COMPOSER_UP
|
tfold 'composer update' $COMPOSER_UP
|
||||||
tfold 'phpunit install' ./phpunit install
|
tfold 'phpunit install' ./phpunit install
|
||||||
if [[ $deps = high ]]; then
|
if [[ $deps = high ]]; then
|
||||||
echo "$COMPONENTS" | parallel --gnu -j10% "tfold {} 'cd {} && $COMPOSER_UP && $PHPUNIT_X$LEGACY'"
|
echo "$COMPONENTS" | parallel --gnu "tfold {} 'cd {} && $COMPOSER_UP && $PHPUNIT_X$LEGACY'"
|
||||||
elif [[ $deps = low ]]; then
|
elif [[ $deps = low ]]; then
|
||||||
[[ -e ~/php-ext/composer-lowest.lock.tar ]] && tar -xf ~/php-ext/composer-lowest.lock.tar
|
[[ -e ~/php-ext/composer-lowest.lock.tar ]] && tar -xf ~/php-ext/composer-lowest.lock.tar
|
||||||
tar -cf ~/php-ext/composer-lowest.lock.tar --files-from /dev/null
|
tar -cf ~/php-ext/composer-lowest.lock.tar --files-from /dev/null
|
||||||
php .github/rm-invalid-lowest-lock-files.php $COMPONENTS
|
php .github/rm-invalid-lowest-lock-files.php $COMPONENTS
|
||||||
echo "$COMPONENTS" | parallel --gnu -j10% "tfold {} 'cd {} && ([ -e composer.lock ] && ${COMPOSER_UP/update/install} || $COMPOSER_UP --prefer-lowest --prefer-stable) && $PHPUNIT_X'"
|
echo "$COMPONENTS" | parallel --gnu "tfold {} 'cd {} && ([ -e composer.lock ] && ${COMPOSER_UP/update/install} || $COMPOSER_UP --prefer-lowest --prefer-stable) && $PHPUNIT_X'"
|
||||||
echo "$COMPONENTS" | xargs -n1 -I{} tar --append -f ~/php-ext/composer-lowest.lock.tar {}/composer.lock
|
echo "$COMPONENTS" | xargs -n1 -I{} tar --append -f ~/php-ext/composer-lowest.lock.tar {}/composer.lock
|
||||||
else
|
else
|
||||||
echo "$COMPONENTS" | parallel --gnu "tfold {} $PHPUNIT_X {}"
|
echo "$COMPONENTS" | parallel --gnu "tfold {} $PHPUNIT_X {}"
|
||||||
|
@ -11,10 +11,13 @@
|
|||||||
|
|
||||||
namespace Symfony\Bundle\TwigBundle\Tests\Loader;
|
namespace Symfony\Bundle\TwigBundle\Tests\Loader;
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference;
|
|
||||||
use Symfony\Bundle\TwigBundle\Loader\FilesystemLoader;
|
use Symfony\Bundle\TwigBundle\Loader\FilesystemLoader;
|
||||||
use Symfony\Bundle\TwigBundle\Tests\TestCase;
|
use Symfony\Bundle\TwigBundle\Tests\TestCase;
|
||||||
|
use Symfony\Component\Templating\TemplateReferenceInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group legacy
|
||||||
|
*/
|
||||||
class FilesystemLoaderTest extends TestCase
|
class FilesystemLoaderTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testGetSourceContext()
|
public function testGetSourceContext()
|
||||||
@ -61,7 +64,7 @@ class FilesystemLoaderTest extends TestCase
|
|||||||
->expects($this->once())
|
->expects($this->once())
|
||||||
->method('parse')
|
->method('parse')
|
||||||
->with('name.format.engine')
|
->with('name.format.engine')
|
||||||
->willReturn(new TemplateReference('', '', 'name', 'format', 'engine'))
|
->willReturn($this->getMockBuilder(TemplateReferenceInterface::class)->getMock())
|
||||||
;
|
;
|
||||||
|
|
||||||
$locator = $this->getMockBuilder('Symfony\Component\Config\FileLocatorInterface')->getMock();
|
$locator = $this->getMockBuilder('Symfony\Component\Config\FileLocatorInterface')->getMock();
|
||||||
@ -85,7 +88,7 @@ class FilesystemLoaderTest extends TestCase
|
|||||||
->expects($this->once())
|
->expects($this->once())
|
||||||
->method('parse')
|
->method('parse')
|
||||||
->with('name.format.engine')
|
->with('name.format.engine')
|
||||||
->willReturn(new TemplateReference('', '', 'name', 'format', 'engine'))
|
->willReturn($this->getMockBuilder(TemplateReferenceInterface::class)->getMock())
|
||||||
;
|
;
|
||||||
|
|
||||||
$locator = $this->getMockBuilder('Symfony\Component\Config\FileLocatorInterface')->getMock();
|
$locator = $this->getMockBuilder('Symfony\Component\Config\FileLocatorInterface')->getMock();
|
||||||
|
@ -60,6 +60,10 @@ final class PropertyInfoLoader implements LoaderInterface
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!property_exists($className, $property)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$types = $this->typeExtractor->getTypes($className, $property);
|
$types = $this->typeExtractor->getTypes($className, $property);
|
||||||
if (null === $types) {
|
if (null === $types) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -48,4 +48,8 @@ class PropertyInfoLoaderEntity
|
|||||||
public $alreadyPartiallyMappedCollection;
|
public $alreadyPartiallyMappedCollection;
|
||||||
|
|
||||||
public $readOnly;
|
public $readOnly;
|
||||||
|
|
||||||
|
public function setNonExistentField()
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,7 @@ class PropertyInfoLoaderTest extends TestCase
|
|||||||
'alreadyMappedNotBlank',
|
'alreadyMappedNotBlank',
|
||||||
'alreadyPartiallyMappedCollection',
|
'alreadyPartiallyMappedCollection',
|
||||||
'readOnly',
|
'readOnly',
|
||||||
|
'nonExistentField',
|
||||||
])
|
])
|
||||||
;
|
;
|
||||||
$propertyInfoStub
|
$propertyInfoStub
|
||||||
|
Reference in New Issue
Block a user