Attached are assertions for the classes of the theme namespace that are believed to be good (the PHPUnit tests pass locally). Child tickets for this are the assertions that aren't currently passing for one reason or another.
Refer to the do not test diff as it contains only the code relevant to this issue. The tested patch has the parent ticket code with its tools.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | core_theme_assertions-2516624-12.patch | 13.73 KB | rumburak |
| theme-assertions--do-not-test.diff | 13.85 KB | Aki Tendo | |
| theme-assertions.diff | 35.83 KB | Aki Tendo |
Comments
Comment #3
markdorisonPatch no longer applies cleanly.
Comment #4
joelpittetComment #5
rumburak commentedHi, I am in DrupalCon Dublin and starting to work on this.
Comment #6
danylevskyiHelping to working on the issue.
Comment #7
rumburak commentedHere is the fixed patch with refactoring based on the last version of 8.3.x.
Comment #9
rumburak commentedSecond fix for the patch, refactoring code for the assertion on the constructor for ThemeInitialization.php.
Comment #11
stefan.r commentedhelping rumburak with this -- but we'll need to check what the status of assertions in D8 is, I don't know that we're using many of them yet, and there were some concerns around security?
Comment #12
rumburak commentedHope this is the good one... Refactored the use of the Assertion class into the Inspector one.
Comment #13
rumburak commentedIt seems there still are some issues with the code for the assert:
assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllObjects($this->sortedNegotiators, \'\\Drupal\\Core\\Theme\\ThemeNegotiatorInterface\')');and
assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllObjects($base_themes, \'\Drupal\\Core\\Extension\\Extension\')');I will check better the proper syntax for this, I have to run now to catch the flight.
Comment #15
manuel garcia commentedComment #29
smustgrave commentedThank you for creating this issue to improve Drupal.
We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
Comment #31
smustgrave commentedBelieve this can be closed as we are now typehinting and adding return types.