symfony1 icon indicating copy to clipboard operation
symfony1 copied to clipboard

fix: PHP warnings triggered by the test suite

Open alquerci opened this issue 1 year ago • 1 comments

The test should fail when a warning PHP error occurred.

Depends on

  • #301

How to execute tests?

To make test passes, I apply the following dependencies:

  • #293
  • #270
  • #301

Checkout the "bundle": https://github.com/alquerci/symfony1/tree/fixtest-fail-on-php-errors--dev

Then execute:

test/bin/test --dependency-preferences 'lowest highest'

What is done?

  • Set consistent error_reporting to catch from PHP warnings and higher errors.
  • [validator] Fix two kind of warning
  • [mailer] fix the support for swiftmailler 6
    • An alternative with tests for swiftmailer fix #279
    • The default sfMailer transport for Switf v6 is Swift_SmtpTransport instead of Swift_MailTransport.
      • As Swift_MailTransport as been removed.
    • Use composer version of swiftmailler by default on test.
    • Add test without composer
    • Remove duplicated code for loading from submodule
  • Update core autoloader, and apply 4 space indents.
    • data/bin/symfony symfony:test --trace --update-autoloader

What about the CI?

I try to put a PHP error_reporting directive, but the execution environment looks like different than docker.

Next steps

  • notice
  • strict
  • deprecated

alquerci avatar Jan 01 '24 09:01 alquerci

@thePanz hey, I got it tests passes on GitHub action.

Let me know whether this PR has any chance to be merged.

alquerci avatar Jan 07 '24 17:01 alquerci