Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature TR-4391 ensure PHP 8.1 support by the legacy release #321

Merged
merged 11 commits into from
Jul 18, 2022

Conversation

kilatib
Copy link
Contributor

@kilatib kilatib commented Jul 18, 2022

TR-4391

Development impact

  1. BREAKING CHANGE: SerializableDomDocument no longer extends DOMDocument due to a serialization-preventing bug in PHP 8.1 DOMNode serialization on PHP ^8.1 php/php-src#8996
  2. Now where it possible after call getXml() we should assign ExternalQtiComponent as SerializableDomDocument not like DOMDocument
  3. Correct test to check right class type.

@codecov-commenter
Copy link

codecov-commenter commented Jul 18, 2022

Codecov Report

Merging #321 (2f29562) into legacy (fea5706) will increase coverage by 0.00%.
The diff coverage is 91.89%.

@@            Coverage Diff            @@
##             legacy     #321   +/-   ##
=========================================
  Coverage     87.66%   87.66%           
- Complexity     8860     8876   +16     
=========================================
  Files           829      829           
  Lines         22021    22051   +30     
=========================================
+ Hits          19304    19331   +27     
- Misses         2717     2720    +3     
Impacted Files Coverage Δ
qtism/common/dom/SerializableDomDocument.php 91.42% <90.90%> (-8.58%) ⬇️
qtism/data/ExternalQtiComponent.php 87.50% <100.00%> (ø)
...sm/data/content/interactions/CustomInteraction.php 95.00% <100.00%> (ø)
...tism/data/expressions/operators/CustomOperator.php 86.11% <100.00%> (ø)
qtism/data/rules/Selection.php 86.84% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fea5706...2f29562. Read the comment docs.

@wazelin wazelin changed the title Feature/tr 4391/ensure qti sdk php 8 support legacy Feature TR-4391 ensure PHP 8.1 support by the legacy release Jul 18, 2022
sprintf('Undefined property: %s::%s', SerializableDomDocument::class, $property)
);

$dom->$property;
Copy link
Contributor

Choose a reason for hiding this comment

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

I am getting this error locally:

Time: 01:53.357, Memory: 84.00 MB

There was 1 error:

1) qtismtest\common\dom\SerializableDomDocumentTest::testAccessingInexistentProperty
Undefined property: qtism\common\dom\SerializableDomDocument::test

/Users/gabriel.soares/repos/qti-sdk/qtism/common/dom/SerializableDomDocument.php:164
/Users/gabriel.soares/repos/qti-sdk/test/qtismtest/common/dom/SerializableDomDocumentTest.php:42
phpvfscomposer:///Users/gabriel.soares/repos/qti-sdk/vendor/phpunit/phpunit/phpunit:97

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, problem with 7.1 and 7.2 with correctly catch this exception I research a solution to downgrade the $this->expectWarning(); method

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please check now

Copy link
Contributor

Choose a reason for hiding this comment

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

Test is passing now, thanks

Copy link
Member

@wazelin wazelin left a comment

Choose a reason for hiding this comment

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

  • New code is covered by tests (if applicable)
  • Tests are running successfully (old and new ones) on my local machine (if applicable)
  • New code is respecting code style rules
  • New code is respecting best practices
  • New code is not subject to concurrency issues (if applicable)
  • Feature is working correctly on my local machine (if applicable)
  • Acceptance criteria are respected
  • Pull request title and description are meaningful
  • Pull request's target is not master

@wazelin wazelin merged commit 9a3280b into legacy Jul 18, 2022
@wazelin wazelin deleted the feature/TR-4391/ensure_qti_sdk_php_8_support_legacy branch July 18, 2022 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants