Propel2 icon indicating copy to clipboard operation
Propel2 copied to clipboard

Validator behaviors fail

Open crossan007 opened this issue 6 years ago • 2 comments

After a recent composer update, my Propel2 validation behaviors began failing.

Error message given include:

In Inline.php line 450:
                                                                                                                                                                 
  Colons must be followed by a space or an indication character (i.e. " ", ",", "[", "]", "{", "}") at line 1 (near "{column: per_firstname, validator: Length   
  , options: {min:2, max: 50}}").                                                                                                                                
                       
In Inline.php line 450:
                                                                                                                                                                 
  Colons must be followed by a space or an indication character (i.e. " ", ",", "[", "]", "{", "}") at line 1 (near "{column: linkname, validator: Length, opt   
  ions: {min:2, max: 50}}").

It looks like symfony/yaml updated (since it's not specified in Propel2's composer.json file) from 3.4.35 to 4.3.8, which introduced a breaking change to Propel2's reliance on it for the validate behavior.

I resolved it by specifying "symfony/yaml":"^3.4" in my project's composer.json.

crossan007 avatar Nov 15 '19 00:11 crossan007

This will be interesting for https://github.com/propelorm/Propel2/issues/1578 //cc @Incognito

dereuromark avatar Jun 30 '20 14:06 dereuromark

I've seen some issues with yaml 3.0->3.3, I'll check deeper into it.

Do you have an example of the smallest amount of code I can use to reproduce this? It would help if you shared your composer.json and php version also.

Incognito avatar Jul 01 '20 08:07 Incognito