Skip to content

Commit 66b6e15

Browse files
authored
Merge branch 'gh-pages' into patch-rpm
2 parents 22e2653 + e68179a commit 66b6e15

18 files changed

+73
-73
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Copyright (c) 2013 Josh Lockhart
1+
Copyright (c) 2025 Josh Lockhart
22

33
https://creativecommons.org/licenses/by-nc-sa/3.0/

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ You should read the `CONTRIBUTING.md` file for precise instructions and tips. Bu
3636
<https://www.phptherightway.com>
3737

3838
* [English](https://www.phptherightway.com)
39-
* [Deutsch](https://rwetzlmayr.github.io/php-the-right-way)
4039
* [Español](https://phpdevenezuela.github.io/php-the-right-way)
4140
* [Français](https://eilgin.github.io/php-the-right-way/)
4241
* [Indonesia](https://id.phptherightway.com)
@@ -79,7 +78,7 @@ There's been a lot of discussion lately about how the PHP community lacks suffic
7978

8079
## Who
8180

82-
My name is [Josh Lockhart](https://twitter.com/codeguy). I'm the author of the [Slim Framework](https://www.slimframework.com/), and I work for [New Media Campaigns](https://www.newmediacampaigns.com/).
81+
My name is [Josh Lockhart](https://x.com/codeguy). I'm the author of the [Slim Framework](https://www.slimframework.com/), and I work for [New Media Campaigns](https://www.newmediacampaigns.com/).
8382

8483
### Collaborators
8584

_config.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ defaults:
1818
path: ""
1919
values:
2020
sitemap: false
21+
image:
22+
path: /images/og-image.png
23+
width: 1024
24+
height: 640
25+
alt: "PHP: The Right Way"
2126

2227
# Excludes should be appended to the default
2328
# https://github.com/jekyll/jekyll/blob/master/lib/site_template/_config.yml#L37-L55
@@ -27,7 +32,9 @@ exclude:
2732
- gemfiles/
2833
- Gemfile
2934
- Gemfile.lock
35+
- Gruntfile.js
3036
- node_modules/
37+
- package.json
3138
- vendor/bundle/
3239
- vendor/cache/
3340
- vendor/gems/
@@ -39,3 +46,8 @@ exclude:
3946
- pages/example.md
4047

4148
future: true
49+
50+
title: "PHP: The Right Way"
51+
tagline: Reference for PHP best practices
52+
description: An easy-to-read, quick reference for PHP best practices, accepted coding standards, and links to authoritative PHP tutorials around the Web
53+
logo: /images/og-image.png

_includes/welcome.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ and examples as they become available.
2020
_PHP: The Right Way_ is translated into many different languages:
2121

2222
* [English](https://www.phptherightway.com)
23-
* [Deutsch](https://rwetzlmayr.github.io/php-the-right-way)
2423
* [Español](https://phpdevenezuela.github.io/php-the-right-way)
2524
* [Français](https://eilgin.github.io/php-the-right-way/)
2625
* [Indonesia](https://id.phptherightway.com)

_layouts/default.html

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,11 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8"/>
5-
<title>{% if page.title %}{{ page.title }} - {% endif %}PHP: The Right Way</title>
6-
<meta name="description" content="{{ page.description }}"/>
5+
6+
{% seo %}
7+
78
<meta name="robots" content="index,follow,archive"/>
8-
<meta property="og:image:url" content="https://www.phptherightway.com/images/og-image.png"/>
9-
<meta property="og:image:width" content="1024"/>
10-
<meta property="og:image:height" content="640"/>
11-
<meta property="og:title" content="PHP: The Right Way"/>
12-
<meta property="og:description" content="An easy-to-read, quick reference for PHP best practices, accepted coding standards, and links to authoritative PHP tutorials around the Web"/>
13-
<meta property="og:url" content="https://www.phptherightway.com"/>
14-
<meta property="og:site_name" content="PHP: The Right Way"/>
15-
<meta property="og:type" content="website"/>
9+
1610
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
1711
<link rel="icon" href="{{ site.baseurl }}images/favicon.png" type="image/png"/>
1812
<link rel="stylesheet" href="{{ site.baseurl }}styles/syntax.css">
@@ -25,7 +19,7 @@
2519
<h1><a href="/">PHP <em>The Right Way</em></a></h1>
2620
<div class="build-date">Last Updated: {{ site.time }}</div>
2721
<div class="share">
28-
<a class="btn-share" href="https://twitter.com/intent/tweet?text=PHP+The+Right+Way&amp;url=https%3A%2F%2Fwww.phptherightway.com&amp;hashtags=PHP" target="_blank">Share on Twitter</a>
22+
<a class="btn-share" href="https://x.com/intent/tweet?text=PHP+The+Right+Way&amp;url=https%3A%2F%2Fwww.phptherightway.com&amp;hashtags=PHP" target="_blank">Share on X</a>
2923
</div>
3024
<a class="fork-me" href="https://github.com/codeguy/php-the-right-way" target="_blank"></a>
3125
</header>

_layouts/page.html

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,11 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8"/>
5-
<title>{% if page.title %}{{ page.title }} - {% endif %}PHP: The Right Way</title>
6-
<meta name="description" content="{{ page.description }}"/>
5+
6+
{% seo %}
7+
78
<meta name="robots" content="index,follow,archive"/>
8-
<meta property="og:image:url" content="https://www.phptherightway.com/images/og-image.png"/>
9-
<meta property="og:image:width" content="1024"/>
10-
<meta property="og:image:height" content="640"/>
11-
<meta property="og:title" content="PHP: The Right Way"/>
12-
<meta property="og:description" content="An easy-to-read, quick reference for PHP best practices, accepted coding standards, and links to authoritative PHP tutorials around the Web"/>
13-
<meta property="og:url" content="https://www.phptherightway.com"/>
14-
<meta property="og:site_name" content="PHP: The Right Way"/>
15-
<meta property="og:type" content="website"/>
9+
1610
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
1711
<link rel="icon" href="{{ site.baseurl }}images/favicon.png" type="image/png"/>
1812
<link rel="stylesheet" href="{{ site.baseurl }}styles/syntax.css">
@@ -25,7 +19,7 @@
2519
<h1><a href="/">PHP <em>The Right Way</em></a></h1>
2620
<div class="build-date">Last Updated: {{ site.time }}</div>
2721
<div class="share">
28-
<a class="btn-share" href="https://twitter.com/intent/tweet?text=PHP+The+Right+Way&amp;url=https%3A%2F%2Fwww.phptherightway.com&amp;hashtags=PHP" target="_blank">Share on Twitter</a>
22+
<a class="btn-share" href="https://x.com/intent/tweet?text=PHP+The+Right+Way&amp;url=https%3A%2F%2Fwww.phptherightway.com&amp;hashtags=PHP" target="_blank">Share on X</a>
2923
</div>
3024
<a class="fork-me" href="https://github.com/codeguy/php-the-right-way" target="_blank"></a>
3125
</header>
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
---
2-
title: Use the Current Stable Version (8.2)
2+
title: Use the Current Stable Version (8.4)
33
isChild: true
44
anchor: use_the_current_stable_version
55
---
66

7-
## Use the Current Stable Version (8.2) {#use_the_current_stable_version_title}
7+
## Use the Current Stable Version (8.4) {#use_the_current_stable_version_title}
88

9-
If you are getting started with PHP, start with the current stable release of [PHP 8.2][php-release]. PHP 8.x adds many [new features](#language_highlights) over the older 7.x and 5.x versions. The engine has been largely re-written, and PHP is now even quicker than older versions. PHP 8 is a major update of the language and contains many new features and optimizations.
9+
If you are getting started with PHP, start with the current stable release of [PHP 8.4][php-release]. PHP 8.x adds many [new features](#language_highlights) over the older 7.x and 5.x versions. The engine has been largely re-written, and PHP is now even quicker than older versions. PHP 8 is a major update of the language and contains many new features and optimizations.
1010

11-
You should try to upgrade to the latest stable version quickly - PHP 7.4 [is already End of Life][php-supported]. Upgrading is easy, as there are not many backwards compatibility breaks [PHP 8.0][php-bc-80], [PHP 8.1][php-bc-81], [PHP 8.2][php-bc-82]. If you are not sure which version a function or feature is in, you can check the PHP documentation on the [php.net][php-docs] website.
11+
You should try to upgrade to the latest stable version quickly - PHP 7.4 [is already End of Life][php-supported]. Upgrading is easy, as there are not many backwards compatibility breaks [PHP 8.0][php-bc-80], [PHP 8.1][php-bc-81], [PHP 8.2][php-bc-82], [PHP 8.3][php-bc-83], [PHP 8.4][php-bc-84]. If you are not sure which version a function or feature is in, you can check the PHP documentation on the [php.net][php-docs] website.
1212

1313
[php-release]: https://www.php.net/downloads.php
1414
[php-supported]: https://www.php.net/supported-versions.php
1515
[php-docs]: https://www.php.net/manual/
1616
[php-bc-80]: https://www.php.net/manual/migration80.incompatible.php
1717
[php-bc-81]: https://www.php.net/manual/migration81.incompatible.php
1818
[php-bc-82]: https://www.php.net/manual/migration82.incompatible.php
19+
[php-bc-83]: https://www.php.net/manual/migration83.incompatible.php
20+
[php-bc-84]: https://www.php.net/manual/migration84.incompatible.php

_posts/01-04-01-Mac-Setup.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ anchor: mac_setup
55

66
## macOS Setup {#mac_setup_title}
77

8-
macOS comes prepackaged with PHP but it is normally a little behind the latest stable release. There are multiple ways to install the latest PHP version on macOS.
8+
macOS 12 (Monterey) and later does not come prepackaged with PHP. Earlier macOS versions include PHP but are behind the latest stable release. There are multiple ways to install the latest PHP version on macOS.
99

1010
### Install PHP via Homebrew
1111

12-
[Homebrew] is a package manager for macOS that helps you easily install PHP and various extensions. The Homebrew core repository provides "formulae" for PHP 7.4, 8.0, 8.1 and PHP 8.2. Install the latest version with this command:
12+
[Homebrew] is a package manager for macOS that helps you easily install PHP and various extensions. The Homebrew core repository provides "formulae" for PHP 8.1, 8.2, 8.3 and 8.4. Install the latest version with this command:
1313

1414
```
15-
brew install php@8.2
15+
brew install php
1616
```
1717

1818
You can switch between Homebrew PHP versions by modifying your `PATH` variable. Alternatively, you can use [brew-php-switcher][brew-php-switcher] to switch PHP versions automatically.
@@ -21,12 +21,12 @@ You can also switch between PHP versions manually by unlinking and linking the w
2121

2222
```
2323
brew unlink php
24-
brew link --overwrite php@8.1
24+
brew link --overwrite php@8.2
2525
```
2626

2727
```
2828
brew unlink php
29-
brew link --overwrite php@8.2
29+
brew link --overwrite php@8.3
3030
```
3131

3232
### Install PHP via Macports
@@ -40,14 +40,14 @@ MacPorts supports pre-compiled binaries, so you don't need to recompile every
4040
dependency from the source tarball files, it saves your life if you don't
4141
have any package installed on your system.
4242

43-
At this point, you can install `php54`, `php55`, `php56`, `php70`, `php71`, `php72`, `php73`, `php74`, `php80`, `php81` or `php82` using the `port install` command, for example:
43+
At this point, you can install `php54`, `php55`, `php56`, `php70`, `php71`, `php72`, `php73`, `php74`, `php80`, `php81`, `php82` or `php83` using the `port install` command, for example:
4444

4545
sudo port install php74
46-
sudo port install php82
46+
sudo port install php83
4747

4848
And you can run `select` command to switch your active PHP:
4949

50-
sudo port select --set php php82
50+
sudo port select --set php php83
5151

5252
### Install PHP via phpbrew
5353

_posts/02-01-01-Code-Style-Guide.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ And you can run phpcs manually from shell:
3939
phpcs -sw --standard=PSR1 file.php
4040

4141
It will show errors and describe how to fix them.
42-
It can also be helpful to include this command in a git hook.
43-
That way, branches which contain violations against the chosen standard cannot enter the repository until those
42+
It can also be helpful to include the `phpcs` command in a git pre-commit hook with the `--filter=GitStaged` CLI argument.
43+
That way, code which contain violations against the chosen standard cannot enter the repository until those
4444
violations have been fixed.
4545

4646
If you have PHP_CodeSniffer, then you can fix the code layout problems reported by it, automatically, with the
@@ -65,8 +65,8 @@ Finally, a good supplementary resource for writing clean PHP code is [Clean Code
6565
[per-cs]: https://www.php-fig.org/per/coding-style/
6666
[pear-cs]: https://pear.php.net/manual/en/standards.php
6767
[symfony-cs]: https://symfony.com/doc/current/contributing/code/standards.html
68-
[phpcs]: https://github.com/squizlabs/PHP_CodeSniffer
69-
[phpcbf]: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Fixing-Errors-Automatically
68+
[phpcs]: https://github.com/PHPCSStandards/PHP_CodeSniffer
69+
[phpcbf]: https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Fixing-Errors-Automatically
7070
[st-cs]: https://github.com/benmatselby/sublime-phpcs
7171
[phpcsfixer]: https://cs.symfony.com/
7272
[cleancode]: https://github.com/jupeter/clean-code-php

_posts/04-01-01-Dependency-Management.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ anchor: dependency_management
55
# Dependency Management {#dependency_management_title}
66

77
There are a ton of PHP libraries, frameworks, and components to choose from. Your project will likely use
8-
several of them — these are project dependencies. Until recently, PHP did not have a good way to manage
8+
several of them — these are project dependencies. PHP did not have a good way to manage
99
these project dependencies. Even if you managed them manually, you still had to worry about autoloaders.
1010
That is no longer an issue.
1111

0 commit comments

Comments
 (0)