-
Notifications
You must be signed in to change notification settings - Fork 74
Symfony Migration Round 3 - Fight! #2089
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
Draft
ryanrath
wants to merge
39
commits into
ubccr:main
Choose a base branch
from
ryanrath:symfony_round3
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
As of PHP 8.2 dynamically creating properties has been deprecated ( https://php.watch/versions/8.2/dynamic-properties-deprecated ). As the changes to support this are compatible with PHP 7.4 this PR can be merged prior to the main 7.4 -> 8.2 upgrade.
In newer versions of Monolog the shortened versions of the error and critical log methods have been removed so I've updated those usages to the currently supported full name versions
These updates are to prepare for the PHP 8.2 updates / Symfony Migration as the new version of Monolog we're updating to no longer allows us to provide arrays as messages. Thankfully the new version of Monolog does allow for classes that implement `\Stringable` to be provided as a message. To take advantage of this I created a new class called `LogOutput` that implements `\Stringable` and takes / provides as a public member variable an array. This array is used when `__toString()` is called and outputs information as we expect when logging to the console. When logging to the database we instead expect to output json_encoded data. To accomplish this I've added a new "Processor" ( right now this is just an anonymous function, in the Symfony Migration they have a class for these ) to the `CCRDBHandler` that will "enrich" the record being logged by setting a new property called 'formatted' (for the new version of Monolog) prior to CCRDBHandler writing the record to the db. The changes were originally included in the Symfony Migration PR but they don't actually require Symfony to function and will make the Symfony PR smaller.
These updates are to prepare for the PHP 8.2 updates / Symfony Migration as the new version of Monolog we're updating to no longer allows us to provide arrays as messages. Thankfully the new version of Monolog does allow for classes that implement `\Stringable` to be provided as a message. To take advantage of this I created a new class called `LogOutput` that implements `\Stringable` and takes / provides as a public member variable an array. This array is used when `__toString()` is called and outputs information as we expect when logging to the console. When logging to the database we instead expect to output json_encoded data. To accomplish this I've added a new "Processor" ( right now this is just an anonymous function, in the Symfony Migration they have a class for these ) to the `CCRDBHandler` that will "enrich" the record being logged by setting a new property called 'formatted' (for the new version of Monolog) prior to CCRDBHandler writing the record to the db. The changes were originally included in the Symfony Migration PR but they don't actually require Symfony to function and will make the Symfony PR smaller.
12ea7e6 to
bac0050
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NOTE: I'll be closing this PR as soon as #2086 is merged as this PR has all sorts of commits from previous versions of a couple of past PRs so that I could test things out. I have a new branch that is strictly the Symfony Changes that
Description
Motivation and Context
Tests performed
Checklist: