1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00
Commit Graph

998 Commits

Author SHA1 Message Date
Andreas Möller
c093fb5382 Enhancement: Enable trailing_comma_in_multiline fixer (#647)
* Enhancement: Enable and configure trailing_comma_in_multiline fixer

* Fix: Run 'make coding-standards'
2023-12-06 23:16:28 +00:00
Andreas Möller
db4d74648f Remove indentation in array arguments (#860) 2023-12-06 15:08:55 +01:00
Roman Pronskiy
c6525ac6e1 Add mastodon link on mainpage (#837) 2023-11-23 23:26:32 +03:00
Annika Backstrom
e7d92c2599 Add rel=me verification link for Mastodon (#833) 2023-11-23 12:50:13 -06:00
Sergey Panteleev
34b4f31237 PHP 8.3 released! (#825) 2023-11-23 19:39:41 +03:00
Mathias Reker ⚡️
fd62baa267 List syntax (#529)
List (array destructuring) assignment should be declared using the configured syntax.
2023-08-29 11:20:33 +01:00
Sergey Panteleev
ed9aed27f2 PHP 8.2 Release page (#728) 2022-12-08 14:57:26 +03:00
Darian Benam
6d80bca170 Add required alt attribute to hero header image on homepage
Closes GH-693.
2022-09-02 12:33:46 +02:00
Andreas Möller
1ebc2c4996 Enhancement: Enable binary_operator_spaces fixer
Closes GH-667.
2022-08-22 19:17:38 +02:00
Andreas Möller
57f505ed58 Enhancement: Enable and configure concat_space fixer
Closes GH-657.
2022-08-22 19:04:47 +02:00
Andreas Möller
d9bcfed482 Enhancement: Enable array_syntax fixer
Co-authored-by: MathiasReker <mathias@reker.dk>

Closes GH-659.
2022-08-22 18:59:14 +02:00
Andreas Möller
b3c9551c93 Enhancement: Enable no_extra_blank_lines fixer
Closes GH-646.
2022-07-12 14:26:18 +02:00
Andreas Möller
c68e5a9e4a Enhancement: Enable single_space_after_construct fixer
Closes GH-640.
2022-07-12 11:44:23 +02:00
Andreas Möller
f3585d9bdf Enhancement: Enable indentation_type fixer
Closes GH-622.
2022-07-11 20:34:20 +02:00
Andreas Möller
3a2761d9a4 Fix: Heredoc syntax
Closes GH-564.
2022-07-08 23:29:25 +02:00
Ayesh Karunaratne
1b83fd7ab7 Multiple micro-optimizations
* Replace `ob_get_contents();ob_clean()` with `ob_get_clean()`

`ob_get_clean()` is equivalent to `ob_get_contents()` followed by `ob_clean()`.

* Replace `intval()` calls with `(int)` type cast

This is a micro-optimization because `intval()` is a function call, and the type cast is about 6 times fast.

* Replace `preg_replace` call that could be done with an `rtrim()` call

In `./error.php`, there is a `preg_replace('!/+$!', '', $URI);` call that essentially is equivalent to `rtrim()`, that both calls removing trailing slash characters in `$URI`.
The `rtim()` call is more legible and faster.

* Combine consecutive `str_replace` calls to a single `str_replace` call

* Use short ternary operator where possible

Improves code readability.

* Cascade various `else` statements where possible

Cleans up the code by removing unnecessary `else` blocks and moving the code to the parent context if the previous `if` block exits the function by either terminating the script, or with a `return` statement.

* Combine multiple `isset()` calls to a single `isset()`

`isset()` accepts multiple parameters and returns `true` only if all of the parameters are `isset`. It makes sense to combine multiple individual `isset` calls to a single call for better readability.

* Replace `for` loop with a `foreach` loop

* Remove unnecessary character escapes in regular expressions

Regular expression special characters are context-sensitive. For example, special characters such as `.` are not considered special within square braces (`[]`).
This removes several of such instances that certain characters are escaped, but it is not strictly necessary within the context. This improves the readability of the expression.

See more information at [PHP.Watch: Writing better Regular Expressions in PHP](https://php.watch/articles/php-regex-readability#reduce-escape)

* Remove unnecessary break statement

* Remove unnecessary PHP close tags

* Remove redundant JSON_ERROR_NONE check

Remove unnecessary `json_last_error() == JSON_ERROR_NONE` where the decoded object is inspected already.

Closes GH-603.
2022-07-03 12:24:14 +02:00
Mathias Reker ⚡️
530b28e95b Add void return types
Add void return type to functions with missing or empty return statements.

Closes GH-535.
2022-06-17 19:16:52 +02:00
Lucas Azevedo
bab1fa9a92 Add home page social preview (#524) 2022-06-15 12:49:23 +03:00
Lucas Azevedo
cfcf303e02 Improve homepage hero design
Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-459.
2022-06-13 16:07:27 +02:00
Patrick Allaert
5eb615c888 Fixed invalid HTML 2021-11-26 12:43:32 +01:00
Sara Golemon
bfb30b5a2d Handle ?:, ??, and ??= in index.php 2021-05-20 15:04:25 +00:00
Peter Cowburn
69e43607aa home page news is latest 25 entries tagged with "frontpage" 2020-08-25 14:52:47 +01:00
Christoph M. Becker
ab28f2abbf Present PHP downloads on frontpage in reverse order
We want to encourage users to use latest stable versions, and this also
conforms to the order on the download page.
2019-12-11 12:24:50 +01:00
Christoph M. Becker
47f8ecc688 Fix news links
As of commit 464ff73, news entry URLs target https://www.php.net
instead of http://php.net.  Therefore the magic number 15 is no longer
appropriate.  To also cater to existing news entries, we use a
preg_replace() now.

[1] <http://git.php.net/?p=web/php.git;a=commit;h=464ff738bafbd7882c3e9b399531702e95f08023>
2019-07-11 14:31:56 +02:00
Peter Kokot
6ba762f866 Remove redundant script type="text/javascript" attributes
Omitted type means that script is JavaScript [1] and for HTML 5 browsers
can be removed today.

[1] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
2018-10-24 20:37:57 +02:00
Peter Kokot
dd8d8bf863 Sync final and leading newlines
This patch adds some missing newlines, trims some multiple redundant
final newlines into a single one, and trims few redundant leading
newlines.

According to POSIX, a line is a sequence of zero or more non-'<newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-17 12:37:26 +02:00
Peter Kokot
e235f79473 Trim trailing whitespace
This patch cleans all redundant trailing whitespace across the
repository except for the icalendar files.
2018-10-17 10:51:08 +02:00
Levi Morrison
b7fc2a69ef Close ul 2016-11-08 11:37:30 -07:00
Rasmus Lerdorf
252be3c2f0 Avoid wrnings in case we can't get the active branches for some reason 2016-08-04 20:52:37 -07:00
Adam Harvey
0571029639 Add upgrading links next to the download links and remove the sidebar.
Since the UX research I conducted into this change was getting two
shrugging +1s on #php.pecl, I'm happy if someone wants to revert this
and replace it with something better later.
2015-12-03 15:44:04 -08:00
Adam Harvey
fad56c7067 Quick change to link from the sidebar to the 7.0 migration guide.
I might tinker with this further, but let's get this out now and tinker
later. Thanks to Chris for spotting it!
2015-12-03 15:27:05 -08:00
Adam Harvey
f5b80dc59a Fix the changelog links. 2015-12-03 13:08:47 -08:00
Adam Harvey
e76a1c72ad Use get_active_branches() for the download links on the index. 2015-12-03 13:06:44 -08:00
Peter Cowburn
964d4a3812 twitter link visually separated from "special thanks" section on homepage 2015-04-17 09:25:03 +01:00
Sobak
7f0b4a3c86 Update link to migration guide 2014-08-28 21:56:40 +02:00
Peter Cowburn
02093c9cfc move mirror logo from homepage to mirror.php
Mirror.php is a much more appropriate place to be showing off our mirror
providers' logos.
2014-08-20 22:29:24 +01:00
Peter Cowburn
0c461e0a6a Add mirror sponsor logo back to homepage sidebar 2014-08-18 21:54:34 +01:00
Peter Cowburn
10250fbc9e fix homepage upgrading link text 2014-08-04 21:33:44 +01:00
Adam Harvey
5335474af5 Add Twitter icon to the home page, linking to @official_php.
I've deliberately implemented this in such a way as to allow for further social
media buttons down the track if we want. I've also kept it intentionally
unobtrusive: it's there (previously, we only mentioned the Twitter account on
the mailing lists page, which was weird), but pretty subtle in the sidebar.

There's one additional dependency: a one glyph subset of Font Awesome (created
using Fontello) containing the Twitter icon. (Should we later want to include
other icons from Font Awesome, fonts/Font-Awesome/config.json can be fed back
into Fontello as a starting point.) The additional style sheet and font file
are cached correctly, and once loaded by the user, shouldn't need to be loaded
again, as with Fira Sans. On a cold page load, this adds two requests and just
under 3 kB to the page load.

I consider all of this reasonable, both technically and in terms of promoting
@official_php a little more, but I won't be terribly offended if someone wants
to revert this.
2014-07-02 15:19:25 -07:00
Michael
5bfef25e70 Kill off XHTML
Long live HTML5! =)
2014-06-04 19:39:27 +02:00
Paul Dragoonis
3077014284 Working on the responsiveness of the homepage, mainly the right panel and download section. Very minute UI changes 2014-06-01 22:11:55 +01:00
Paul Dragoonis
e99f4a4256 Adding missing title tags to anchors. Fixing casing on titles 2014-06-01 18:34:38 +01:00
Levi Morrison
97e12798e7 Updated some homepage stuff 2014-04-28 10:05:17 -06:00
Levi Morrison
8fb9b79ca8 Related functions now on right; some homepage fixes. 2014-04-27 23:14:11 -06:00
Levi Morrison
7ed703b0d0 Fixing up the downloads section of homepage 2014-04-09 21:18:53 -06:00
Philip Olson
2b91fbb436 This will cause someone to cry, but it looks nicer. Feel free to improve. 2014-04-09 15:59:57 -07:00
Philip Olson
2fc7eeccae Linked 'Download PHP' to downloads.php, as requested by Christopher Jones 2014-04-09 15:45:46 -07:00
Levi Morrison
a0c92b9c7e More date format standardization 2014-03-14 09:01:40 -06:00
Levi Morrison
ae01ce1573 Converted font sizes to rem units for most elements.
Some elements are sized relative to their parent (such as sub, sup); these were
left as em. Adjusted many line-heights, paddings and margins accordingly.

Also simplified some styles as a result.
2014-03-07 11:19:36 -07:00
Levi Morrison
66322fa6e3 Updated markup for news items on homepage to use newer HTML 5 elements; at the same time this fixes #66391. 2014-01-03 10:33:31 -07:00