Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Mutable creation options aware trait #6175

Closed

Conversation

demichl68
Copy link
Contributor

Relates to #6174

@demichl68
Copy link
Contributor Author

Build fails for PHP 5.3 because Traits are PHP >= 5.4

@danizord
Copy link
Contributor

@demichl68 Add @requires PHP 5.4.0 annotation to your testcase.

@demichl68
Copy link
Contributor Author

done, thank you

/**
* @requires PHP 5.4
* @group Zend_ServiceManager
* /
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That space between * and / is causing Travis fail :)

removed trailing space in docblock
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2014

changed copyright information to 2014
@localheinz
Copy link
Member

I apologize for the inconvenience, but the build is failing in relation to #6180.

Rebasing onto master and push-forcing will help.

@Ocramius Ocramius added this to the 2.4.0 milestone Apr 29, 2014
@Ocramius Ocramius self-assigned this Apr 29, 2014
@Ocramius
Copy link
Member

@demichl68 can you check the failures on travis? Specifically PHP 5.3 - I think the @requires annotation is not really working there.

use PHPUnit_Framework_TestCase as TestCase;

/**
* @requires PHP 5.4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5.4.0

@Ocramius
Copy link
Member

@demichl68 the @requires still doesn't work. Use an explicit if (PHP_VERSION_ID < 50400) { $this->markTestSkipped('Requires PHP >=5.4.0'); }

@demichl68
Copy link
Contributor Author

Let's give it another try ...
tbh. I am not sure why @requires doesn't work here ...

@demichl68
Copy link
Contributor Author

Seems like every build within the last couple of days fails, because of:

[LogicException]                                                             
  You must call one of in() or append() methods before iterating over a Finder.

Exception trace:
 () at /home/travis/build/zendframework/zf2/vendor/symfony/finder/Symfony/Component/Finder/Finder.php:688
 Symfony\Component\Finder\Finder->getIterator() at /home/travis/build/zendframework/zf2/vendor/fabpot/php-cs-fixer/Symfony/CS/Fixer.php:92
 Symfony\CS\Fixer->fix() at /home/travis/build/zendframework/zf2/vendor/fabpot/php-cs-fixer/Symfony/CS/Console/Command/FixCommand.php:292
 Symfony\CS\Console\Command\FixCommand->execute() at /home/travis/build/zendframework/zf2/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:241
 Symfony\Component\Console\Command\Command->run() at /home/travis/build/zendframework/zf2/vendor/symfony/console/Symfony/Component/Console/Application.php:895
 Symfony\Component\Console\Application->doRunCommand() at /home/travis/build/zendframework/zf2/vendor/symfony/console/Symfony/Component/Console/Application.php:191
 Symfony\Component\Console\Application->doRun() at /home/travis/build/zendframework/zf2/vendor/symfony/console/Symfony/Component/Console/Application.php:121
 Symfony\Component\Console\Application->run() at /home/travis/build/zendframework/zf2/vendor/fabpot/php-cs-fixer/php-cs-fixer:27

@Ocramius
Copy link
Member

@demichl68 aware of that - not a big deal, I'll merge this right away

/**
* Trait for MutableCreationOptionsAware Factories
*/
trait MutableCreationOptionsAwareTrait
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you actually remove the Aware bit?

* Removed leading \  from Zend namespace in unit test
* Removed @group annotation from unit test
@Ocramius
Copy link
Member

Ocramius commented May 2, 2014

@demichl68 merged, thanks :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants