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

218 Commits

Author SHA1 Message Date
Derick Rethans
7e2d16d545 Revert "Create UserNoteService class"
This reverts commit b31ec1c7f1.
2026-01-21 15:02:14 +00:00
AllenJB
5addc11aba Fix Playwright search tests with static copy of new search indexes 2026-01-13 14:01:54 +01:00
Kamil Tekiela
b31ec1c7f1 Create UserNoteService class 2026-01-13 14:00:36 +01:00
Jordi Kroon
5f7c6aaf10 fix: update docs.php.net URLs to https://www.php.net
Replace outdated docs.php.net domain references with the current
https://www.php.net domain across archive pages and documentation links.
Also remove legacy inactive language filtering logic from download-docs.php
that was specific to the old docs domain.
2026-01-13 13:44:52 +01:00
Kamil Tekiela
e54f5fe9b7 Remove broken code (#1663) 2025-11-27 17:25:14 +00:00
Luffy
2d4419cfd5 Set repository language from query parameter (#1257) 2025-04-15 09:38:31 +08:00
Gina Peter Banyard
50202bbf27 Fix local deployement and add a new doc page (#1181)
Co-authored-by: Sergey Panteleev <sergey@php.net>
2024-12-11 12:48:39 +03:00
Maurício Meneghini Fauth
cdf59074d3 Replace languages.inc globals with I18n\Languages consts (#1121)
The include/languages.inc file was not removed as it's used in other
repositories. It should be removed after migration.

Tests were added to ensure that the global variables and the constants
are in sync with each other.

Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2024-11-14 11:37:00 +03:00
Jim Winstead
b0763029a1 doc.php.net is on HTTPS now, and contribution guide URL changed (#1108) 2024-10-27 00:27:06 +03:00
Jim Winstead
b585014d1f Link to GH issues instead of bugs.php.net for documentation issues (#1078) 2024-09-20 10:43:41 +08:00
Christoph M. Becker
7b11b960e4 Client side validation of form-user (#695)
Co-authored-by: Sergey Panteleev <sergey@php.net>
2024-07-09 10:33:09 +03:00
Andreas Möller
59c070f557 Enhancement: Enable blank_line_after_opening_tag fixer (#875) 2023-12-07 16:57:19 +01:00
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
a528e6e91b Enhancement: Enable no_mixed_echo_print fixer (#864) 2023-12-06 15:19:57 +01:00
Tim Düsterhus
2a5e5a44ab Use white-space: pre-wrap for code formatting (#810)
* Use `white-space: pre-wrap` for code formatting

Apparently code formatting is used for the entire user comments. Use
`white-space: pre-wrap` to avoid horizontal scrolling of the plaintext
description.


see 7d4038829e

* Unify `highlight_php()` with PhD

see php/phd@01d6beb366

* Fix markup for notes in add-note.php
2023-08-30 18:40:00 +01:00
Christoph M. Becker
5dc614b2c5 Fix GH-712: link to mirrors is broken on confirmation page
The mirror program has been retired, so it makes no sense to mention
it.  Still, user notes may take a while to be shown.
2022-10-13 12:27:39 +02:00
Andreas Möller
11c5706c39 Enhancement: Enable random_api_migration fixer
Co-authored-by: Mathias Reker <mathias@reker.dk>

Closes GH-699.
2022-09-16 13:51:25 +02:00
Kamil Tekiela
9752e1b90d Introduce UserNote DTO and refactor Sorter (#594) 2022-09-16 12:47:04 +01: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
f127de5db9 Enhancement: Enable strict_param fixer
We set strict param to false to ensure current behavior,
except for two cases where it is safe to go with true.

Closes GH-658.
2022-07-15 14:48:44 +02:00
Andreas Möller
d7e1b8159c Enhancement: Enable constant_case fixer
Co-authored-by: MathiasReker <mathias@reker.dk>

Closes GH-660.
2022-07-15 13:50:13 +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
4bca56f307 Enhancement: Enable trim_array_spaces fixer
Closes GH-644.
2022-07-12 13:26:23 +02:00
Christoph M. Becker
16fd981d27 Include spam_challenge.php only once
The file contains only definitions, and as such multiple inclusion
would never make sense.
2022-07-12 11:49:01 +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
4b3e3c9a6b Enhancement: Enable whitespace_after_comma_in_array fixer
Closes GH-637.
2022-07-11 20:13:00 +02:00
Andreas Möller
acb371e452 Enhancement: Extract constants to avoid mutable global state
Closes GH-626.
2022-07-09 14:03:19 +02:00
Ayesh Karunaratne
746d3d71ef HTML A11y improvements in add-note.php, my.php and vote-note.php
Also use strict comparison in pages that are changed.

Closes GH-610.
2022-07-04 13:25:36 +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
Andreas Möller
c3f9653226 Remove useless function manual_header()
Closes GH-584.
2022-07-02 11:53:37 +02:00
Andreas Möller
65254462c6 Fix: Remove extra closing tag
Closes GH-589.
2022-06-29 11:43:33 +02:00
Mathias Reker ⚡️
546b144fe3 Use elseif instead of else if
Closes GH-534.
2022-06-17 19:19:12 +02:00
Mathias Reker ⚡️
ede0cad42f Ternary to null coalescing
Use null coalescing operator ?? where possible.

Closes GH-528.
2022-06-17 18:43:40 +02:00
Mathias Reker ⚡️
89ac76cd81 No alias functions
Canonical functions shall be used instead of aliases.

Closes GH-530.
2022-06-17 17:14:03 +02:00
Mathias Reker ⚡️
11866535bf Combine consecutive issets
Using isset($var) && multiple times should be done in one call.

Co-authored-by: Andreas Möller <am@localheinz.com>

Closes GH-542.
2022-06-17 16:29:04 +02:00
Mathias Reker ⚡️
63f1e9d004 No superfluous elseif
Replaces superfluous elseif with if.

Closes GH-549.
2022-06-17 16:00:47 +02:00
Nikita Popov
16f4045cf0 Replace master -> main in more places 2021-04-06 15:42:28 +02:00
Anna Filina
3308dd45f6 Add link to hosted legacy docs
Closes GH-387.
2020-12-18 23:53:56 +01:00
Anna Filina
d56830dfce Display custom 404 page when legacy manuals found
Closes GH-385.
2020-12-14 19:50:51 +01:00
Christoph M. Becker
b412845320 Archive PHP 5 documentation
We prepare for the actual removal of PHP 5 specific documentation by
setting up the necessary information.
2020-09-24 20:02:57 +02:00
Sara Golemon
cfc6b38ec8 Goodbye Magic Quotes 2019-07-10 13:45:01 -04:00
Sara Golemon
c0afd74bf7 Swap uses of _SERVER[DOCUMENT_ROOT] for __DIR__
2/4 - Update remaining except archives/ and release/.
2019-05-31 12:31:21 -04:00
Peter Kokot
35e766d749 Fix permissions
Having synced file permissions in Git repositories is a reccurring
issue. Git can track files as executables (0755) or not (0644). Usually,
all files except the executable ones such as command line scripts or
binary executables, should be set to 0644.

This patch syncs permissions in the Git repository.
2018-10-25 02:22:08 +02:00
Peter Kokot
b5edd2d17b Change dirname(__FILE__) to shorter __DIR__ 2018-10-23 17:30:55 +02:00
Peter Cowburn
2a12c5fa86 fix mirror noalias file checks
Remove trailing newline from noalias.txt.

Ideally, the check script (web/master.git/scripts/mirror-test) would
accept the trailing newline in this file, but until then revert the
trailing newline added recently (in dd8d8bf863).
2018-10-17 20:51:49 +01: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