Skip to content
This repository was archived by the owner on Feb 1, 2026. It is now read-only.

Update HTML_Common for PHP7.4+ - #3

Closed
MisterIcy wants to merge 7 commits into
pear:trunkfrom
MisterIcy:trunk
Closed

Update HTML_Common for PHP7.4+#3
MisterIcy wants to merge 7 commits into
pear:trunkfrom
MisterIcy:trunk

Conversation

@MisterIcy

Copy link
Copy Markdown

With the coming of PHP8.0, many legacy codebases "broke", for the newest major version contains a lot of changes which are incompatible with older code.

This pull request, contains several changes to modernize the HTML_Common class, of which one is of the greatest importance: the renaming of the class's constructor.

Furthermore a simple workflow was added with linting and basic static analysis, to ensure that the changes work and to facilitate future refactorings.

Comment thread Common.php Outdated
* @static
*/
function charset($newCharset = null)
public function charset(?string $newCharset = null)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think that this function should be static because the charset is global.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

My bad, didn't notice that the method was annotated with @static. The method was made static in d5b198c

Comment thread Common.php Outdated

if (is_array($attributes)) {
$charset = HTML_Common::charset();
$charset = $this->charset();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should use self::charset() instead because html_common is used to know which charset is used globally.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Updated in d5b198c

@MisterIcy
MisterIcy requested a review from golgote June 29, 2022 14:27
@MisterIcy MisterIcy closed this May 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants