Page MenuHomeIn-Portal Phabricator

INP-1422 - Store class map on disk
ClosedPublic

Authored by alex on Apr 26 2015, 11:03 AM.

Details

Summary

After applying the patch make sure, that svn:ignore SVN property on /install/cache in all modules (including core) matches value from the .gitignore file in that folder.

Test Plan
NOTE: Blocking Differential Revisions must be also applied.
  1. perform installation of In-Portal (without modules and with some/all modules)
  2. confirm, that it's possible
  3. open In-Portal and do some common stuff, like browsing Front-End/Admin Console
  4. confirm, that no error happens
  5. create any class, e.g. new helper and don't register it in any unit config
  6. run php tools/build_class_map.php script
  7. confirm, that new class mention was added to a /install/cache/class_map.php file of module, where you've added the class
  8. try using the helper like $this->Application->recallObject('HelperClassName');
  9. confirm, that proper class instance was created
  10. register helper class under different (than class name) pseudo without specifying file key during registration
  11. try using the helper like $this->Application->recallObject('HelperPseudoName');
  12. confirm, that proper class instance was created
  13. create another helper class, but this time don't run class map update script
  14. try using the helper like $this->Application->recallObject('AnotherHelperClassName');
  15. confirm, that exception is thrown with suggestion to use class map rebuild script
  16. repeat last 3 steps but use makeClass method instead (before direct makeClass call on wrong class would end up in weird error)
  17. confirm, that classes, interfaces and traits are all discovered and placed into classmap

Diff Detail

Repository
rINP In-Portal
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

alex updated this revision to Diff 163.Apr 26 2015, 11:03 AM
alex retitled this revision from to INP-1422 - Store class map on disk.
alex updated this object.
alex edited the test plan for this revision. (Show Details)
alex added 1 JIRA issue(s): INP-1422.
alex updated this object.Apr 26 2015, 11:07 AM
alex edited edge metadata.
alex edited the test plan for this revision. (Show Details)Apr 26 2015, 11:14 AM
alex updated this revision to Diff 164.Apr 26 2015, 11:16 AM

Fixed some minor CS issues.

alex edited the test plan for this revision. (Show Details)Apr 27 2015, 1:44 AM
alex edited the test plan for this revision. (Show Details)Apr 27 2015, 1:48 AM
alex updated this revision to Diff 165.Apr 27 2015, 2:04 AM
  1. moving error reporting about non-existing class from recallObject to makeClass
  2. mention class map rebuild script in error message about missing class
alex planned changes to this revision.Apr 27 2015, 9:14 AM
alex added inline comments.
composer.json
7 ↗(On Diff #165)

In fact it maybe better to:

  1. move this into require-dev part, because only developers would be rebuilding classmap
  2. place a check in classmap builder for case, when PHP parser classes are missing with message to run php composer.phar install --dev command
alex updated this revision to Diff 167.Apr 27 2015, 3:25 PM

Make PHP parser required only during development. In case missing PHP parser throw an exception immediately.

alex edited the test plan for this revision. (Show Details)Apr 28 2015, 7:17 AM
glebs accepted this revision.Apr 28 2015, 11:35 AM
glebs edited edge metadata.
This revision is now accepted and ready to land.Apr 28 2015, 11:35 AM
This revision was automatically updated to reflect the committed changes.