🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@andrerom
Copy link
Contributor

@andrerom andrerom commented Apr 8, 2015

Factories: https://jira.ez.no/browse/EZP-24460
SecurityContext: https://jira.ez.no/browse/EZP-24461
Yaml::parse(): https://jira.ez.no/browse/EZP-24464
Synchronized SiteAccess: https://jira.ez.no/browse/EZP-24459
Request injection: https://jira.ez.no/browse/EZP-24457
Require Symfony 2.7: https://jira.ez.no/browse/EZP-24465

  • Require Symfony 2.7
  • setFactory*
  • Yaml:parse
  • SecurityContextInterface
  • Synchronized SiteAccess

Candidates for backports to 5.4

  • Fix EZP-24460: Fix service factories deprecation warnings 7263ef4
  • Fix EZP-24464: Fix Yaml::parse() usage 0db5901
  • EZP-24458: Silent deprecation warnings on syncronized FakeServices 7473570
  • Fix EZP-24465: Bump Symfony requirement to v2.7 da19b18
  • EZP-24459: Manually set ezpublish.siteaccess service synchronized 36fb72c

Follow-ups

@andrerom andrerom changed the title [Symfony 2.7] Fix use of deprecated features & dissalow tests to fail [Symfony 2.7] Fix use of deprecated features Apr 8, 2015
@andrerom andrerom changed the title [Symfony 2.7] Fix use of deprecated features [Symfony 2.7] Fix deprecation warnings Apr 8, 2015
@andrerom andrerom force-pushed the sf27 branch 18 times, most recently from 7096233 to 10ec462 Compare April 10, 2015 23:28
Copy link
Contributor Author

Choose a reason for hiding this comment

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

A bit unsure what factory w/o method means, so is this by any chance a left over?

Copy link
Contributor

Choose a reason for hiding this comment

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

Weird...
Ping @bdunogier

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not to familiar with these Fake services, so unsure if it is another/better way without big refactoring of this.

Copy link
Contributor

Choose a reason for hiding this comment

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

This will be a problem for us, for sure... I don't see how to workaround this future removal.
Ping @fabpot maybe?

@andrerom andrerom changed the title [Symfony 2.7] Fix deprecation warnings [WIP][Symfony 2.7] Fix deprecation warnings Apr 13, 2015
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be:

ezpublish.cache_pool:
    class: %ezpublish.cache_pool.class%
    factory: ["@ezpublish.cache_pool.factory", getCachePool]
    arguments: [@ezpublish.config.resolver]

@andrerom
Copy link
Contributor Author

andrerom commented Jun 3, 2015

It's not exactly the same thing. The RequestStack was introduced to solve the multiple requests problem (sub requests). This is not the case here.

@lolautruche hmm, it might actually be on second thought on this. In regards to the link issue today on linking from one site access to another there is basically a need to swap out current site access temporary right? So there is a possible need for stack here as well.

@lolautruche
Copy link
Contributor

@andrerom The issue discussed with @larseirik has nothing to do with this. The SiteAccess is unique for requests/sub-requests. When doing a cross-siteaccess link, we don't swap out the current SiteAccess, we do a reverse lookup and complement generated link.
The only exception is content preview where we change the default scope, and there is a specific event-based mechanism for that. This is what needs to be fixed.

@andrerom
Copy link
Contributor Author

andrerom commented Jun 3, 2015

ok, assumed the reverse lookup would have to swap siteaccess as well to make sure whole system generates the Url using the right settings, including taking right rootLocationId setting into account.

@lolautruche
Copy link
Contributor

including taking right rootLocationId setting into account.

That might be the missing part of EZP-24470, but I still need to take some time to check what is wrong.

@andrerom
Copy link
Contributor Author

andrerom commented Jun 3, 2015

ok

@andrerom
Copy link
Contributor Author

andrerom commented Jun 3, 2015

Besides, as said on Skype, I'm ok with the proposed backports so +1 on those for master and 5.4.

As for my suggestion on splitting this branch, I was thinking you needed a few of the commits in master for the version bump, while others can mature a bit if needed.

@lolautruche
Copy link
Contributor

I'll maybe just split out the SiteAccess commit, because it's incomplete and also has its separate issue.

.travis.yml Outdated
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As composer is bumped to use 2.7 by default we should rather change any use of SYMFONY_VERSION="~2.7" to SYMFONY_VERSION="~2.8@dev", no need to add additional job given 2.3 is out.

Copy link
Contributor

Choose a reason for hiding this comment

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

But isn't it what I did?

This PR has been rebased against master, so test with ~2.8@dev is in allow_failures. I was not adding a new test here. Or did I overlook something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the diff above does add a new test in include section, while the change:

-      env: TEST_CONFIG="phpunit.xml" SYMFONY_VERSION="~2.7@dev"
+      env: TEST_CONFIG="phpunit.xml" SYMFONY_VERSION="~2.7"

could have just been:

-      env: TEST_CONFIG="phpunit.xml" SYMFONY_VERSION="~2.7@dev"
+      env: TEST_CONFIG="phpunit.xml" SYMFONY_VERSION="~2.8@dev"

hence making the change I comment on unneeded.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, but then we won't test with PHP 5.5 and Symfony 2.7... But I think that's OK?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. We can't test everything on everything as it would lead to 30 or more jobs, so we spread the tests out. alternative is to not test 2.8.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK fixed

@andrerom
Copy link
Contributor Author

andrerom commented Jun 3, 2015

Ok, I'm +1 with SiteAccess separated, and nitpick above about on how we can test 2.8 w/o adding additional jobs covered.

@lolautruche
Copy link
Contributor

Removed SiteAccess change from the commit list. I'll do another PR for this.

@andrerom
Copy link
Contributor Author

andrerom commented Jun 3, 2015

+1 if/when travis agrees :)

It's not possible to silent the deprecation warning from YAML.
@lolautruche
Copy link
Contributor

Just added 36fb72c to fix tests.

@andrerom
Copy link
Contributor Author

andrerom commented Jun 4, 2015

+1 ping @pspanja / @glye

@lolautruche
Copy link
Contributor

Another round of review? I thought everyone was +1

lolautruche added a commit that referenced this pull request Jun 4, 2015
[Symfony 2.7] Fix deprecation warnings
@lolautruche lolautruche merged commit a07cced into master Jun 4, 2015
@lolautruche lolautruche deleted the sf27 branch June 4, 2015 08:40
@andrerom
Copy link
Contributor Author

andrerom commented Jun 4, 2015

missed the one from pspanja, but otherwise you have a broad definition of everyone ;)

@lolautruche
Copy link
Contributor

everyone => Everyone involved in the discussion

andrerom pushed a commit that referenced this pull request Jun 4, 2015
> https://jira.ez.no/browse/EZP-24459

Follow-up of #1221.
After investigation, it is actually not necessary to *fix*
ContentPreview since the previewed SiteAccess is already correctly
handled, as the content preview is rendered through a sub-request. In
this regard, SiteAccess match done normally (not limited to master
request).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants