Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Replaced use of ltrim as it doesn't work as intended. #292

Merged
merged 1 commit into from
Jan 21, 2019

Conversation

ianwilk52
Copy link
Contributor

ltrim removes everything until a character not in the map is encountered, by the looks of it, only "{$rootPart->getAlias()}." should be removed.

Copy link

@antoniocambados antoniocambados left a comment

Choose a reason for hiding this comment

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

I've just had this issue. I realized the problem was using the ltrim, with nearly identical alias and field values. I ended up with the very same preg_replace code that @ianwilk52 provides in this PR, and it works fine :)

@ph538834
Copy link

i too had this issue. it was timeconsuming to find the reason.
pr works fine.
please merge.

@gilles-g gilles-g self-requested a review January 18, 2019 15:36
@gilles-g gilles-g merged commit 89e1b00 into lexik:master Jan 21, 2019
@gilles-g
Copy link
Member

Thx 👍

@gilles-g
Copy link
Member

I have revert the PR cause break all tests.

@ph538834
Copy link

because im interestet in reasons for the braking tests i tried installing the last set of dependencies (copiing from the travis output of the test from 5.0.7) and get exact the same errors. how is this possible? even my local php install is minimum that age.
And sorry for not running test before i approved the pr, even when its not the source of the problem

@ph538834
Copy link

Ahh i found it the hard coded year 2013 in the test is invalid because the symfony default is:
'years' => range(date('Y') - 5, date('Y') + 5),
ill create pr this weekend

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

Successfully merging this pull request may close these issues.

4 participants