Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix composite parameters #423

Merged
merged 1 commit into from
Jul 12, 2016

Conversation

theofidry
Copy link
Member

@theofidry theofidry commented Jul 12, 2016

In b80fdfa (#355), the Processor method Parameterized has been refactored to be more readable and robust. In the process, a non covered case involving composite keys has been broken. This commit fix the BC break introduced and add a test case for it.

Related to #421.

In b80fdfa (nelmio#355), the Processor method Parameterized has been refactored to be more readable and robust. In the process, a non covered case involving composite keys has been broken. This commit fix the BC break introduced and add a test case for it.
$this->assertInstanceOf(self::USER, $user);
$this->assertEquals('Nan Bat!', $user->username);
//$this->assertEquals('NaN Bat!', $user->username); Not supported yet
Copy link
Contributor

Choose a reason for hiding this comment

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

This commented code should not be here IMHO.

@soullivaneuh
Copy link
Contributor

Seems to not fix my issue:

  [Hautelook\AliceBundle\Alice\DataFixtures\LoadingLimitException]                                                             
  Loading files limit of 5 reached. Could not load the following files:                                                        
  /code/src/AppBundle/DataFixtures/ORM/cron.yml:                                                                               
   - Instance mask "domain_*" did not match any existing instance, make sure the object is created after its references        
  /code/src/AppBundle/DataFixtures/ORM/domain.yml:                                                                             
   - Instance mask "server_nx102*" did not match any existing instance, make sure the object is created after its references   
  /code/src/AppBundle/DataFixtures/ORM/incident.yml:                                                                           
   - Instance mask "server_*" did not match any existing instance, make sure the object is created after its references        
  /code/src/AppBundle/DataFixtures/ORM/ip_v4.yml:                                                                              
   - Instance server_default is not defined                                                                                    
  /code/src/AppBundle/DataFixtures/ORM/operation.yml:                                                                          
   - Instance cron_98 is not defined                                                                                           
   - Instance cron_95 is not defined                                                                                           
   - Instance cron_6 is not defined                                                                                            
   - Instance cron_99 is not defined                                                                                           
   - Instance cron_49 is not defined                                                                                           
   - Instance cron_41 is not defined                                                                                           
  /code/src/AppBundle/DataFixtures/ORM/package.yml:                                                                            
   - Instance mask "server_*" did not match any existing instance, make sure the object is created after its references        
  /code/src/AppBundle/DataFixtures/ORM/puppet.yml:                                                                             
   - Entity with ID @puppet_package_www-servers_apache and class AppBundle\Entity\PuppetPackage not found                      
  /code/src/AppBundle/DataFixtures/ORM/server.yml:                                                                             
   - Instance os_gentoo is not defined                                                                                         
   - Instance mask "puppet_class_*" did not match any existing instance, make sure the object is created after its references  
  /code/src/AppBundle/DataFixtures/ORM/service_ip.yml:                                                                         
   - Instance mask "server_*" did not match any existing instance, make sure the object is created after its references        

@theofidry
Copy link
Member Author

@soullivaneuh is there any way to get access to a repo where I can reproduce the bug?

@soullivaneuh
Copy link
Contributor

@theofidry Sadly no. This is a private project.

I can give you some info:

$ ./docker-console composer show nelmio/alice
name     : nelmio/alice
descrip. : Expressive fixtures generator
keywords : Fixture, data, orm, test
versions : * 2.1.4
type     : library
license  : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
source   : [git] https://github.com/theofidry/alice.git 00b3565132cd69acacc7f7ffbe856af62a26f1a0
dist     : [zip] https://api.github.com/repos/theofidry/alice/zipball/00b3565132cd69acacc7f7ffbe856af62a26f1a0 00b3565132cd69acacc7f7ffbe856af62a26f1a0
names    : nelmio/alice

autoload
psr-4
Nelmio\Alice\ => src/Nelmio/Alice

requires
fzaninotto/faker ~1.0
php >=5.4
symfony/yaml ~2.0|~3.0

requires (dev)
doctrine/common ~2.3
phpunit/phpunit ~4.0
symfony/property-access ~2.2|~3.0
hautelook_alice:
    locale: fr_FR
    seed: 6399

I will test with https://github.com/hautelook/AliceBundle/pull/238 too.

@soullivaneuh
Copy link
Contributor

With alice-bundle PR and this one, I got this:

  [UnexpectedValueException]              
  Instance user_support_4 is not defined  

@theofidry theofidry merged commit 6235797 into nelmio:2.x Jul 12, 2016
@theofidry theofidry deleted the bugfix/bc-break-in-parameterized branch July 12, 2016 17:28
@theofidry
Copy link
Member Author

@soullivaneuh I'm going to merge this one as it's a blocker. Let's continue the investigation for your bit in the original issue.

theofidry added a commit to theofidry/alice that referenced this pull request Jul 16, 2016
* 2.x: (24 commits)
  Update changlog for 2.2.2
  Fix support for hyphens (nelmio#431)
  TypeHintChecker tweaks (nelmio#430)
  Update changelog for 2.2.1
  Add tests for Typehints in setters (nelmio#427)
  Fix usage of empty values with Faker provider (nelmio#426)
  Add tests for templates declared in includes (nelmio#424)
  Fix composite parameters (nelmio#423)
  Fix typo about $fake closure (nelmio#422)
  Tweaks on the CHANGELOG
  Fix minimum PHP version requred
  Update CHANGELOG
  Update composer.json
  Fix unique flag usage with templates
  Harden parameters and references (nelmio#355)
  Fix quotes (nelmio#417)
  Fix identity example (nelmio#416)
  Drop support for PHP 5.4 and 5.5. (nelmio#414)
  Doc tweaks (nelmio#412)
  Cleanup LoaderTest (nelmio#413)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants