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

166 Commits

Author SHA1 Message Date
Tim Düsterhus
acd86a16d9 Link GHSA advisories in ChangeLog (#1082) 2024-10-02 15:52:25 +05:00
Ben Ramsey
97f5bbe679 Announce PHP 8.1.28 2024-04-12 10:51:12 -05:00
Andreas Möller
9482f9bd43 Fix: Remove unused functions (#585) 2023-12-07 18:14:43 +01: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
019de1fee6 Fix: Typo (#868) 2023-12-06 16:55:35 +01:00
Lu Fei
bf7eff4a9c Fix autoload redirect failure (#788) 2023-06-26 14:19:29 +01:00
Christoph M. Becker
bb530230dd Fix news2html truncation
If there are NEWS entries referring to a certain PHP version, these are
interpreted as belonging to that PHP version.  Since the lines actually
delimiting PHP versions are supposed to have comma after the date, we
enforce that now.

Closes GH-730.
2022-12-08 19:45:28 +01:00
Andreas Möller
1d73c26c0b Fix: Avoid generating code without space between comma and function argument
Closes GH-650.
2022-07-12 14:46:56 +02:00
Andreas Möller
a83ae2fa32 Enhancement: Use PSR-4 autoloader (#604) 2022-07-05 12:50:41 +01: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
d6f23ea19b Fix: Move class into src/ (#581) 2022-06-29 19:03:25 +01:00
Sara Golemon
4002804259 Add GH-\d as a rewrite 2021-11-03 16:02:11 +00:00
Sara Golemon
8743f6c518 Minor refactor for NEWS rewrite rules 2021-11-03 15:48:24 +00:00
Mike Schinkel
bdfa96431c Change <a name="..."> to <a id="...">
PhpStorm flagged @name as a deprecated HTML attribute, so it seemed appropriate to change then to @id. In cases where there were both a @name and @id attribute and their values were the same, this commit removes the @name attribute (there were no cases where both @name and @id attributes existed but having different values.)

Closes GH-416.
2021-07-26 16:16:13 +02:00
Sara Golemon
543076f15b Fix BASE_PAGE value on generated release entries 2021-07-08 19:37:24 +00:00
Sara Golemon
22f0d88721 Use simpler === for value check 2021-07-05 14:00:30 +00:00
Patrick Allaert
0004e1c6fc Fixed typo 2021-06-10 18:12:17 +02:00
Sergey Panteleev
b8175b4c9f Changelog bug links (#403)
- Bug and feature request plain text numbers replaced by functions
- Added Implemented FR and GitHub PR replacements
2021-05-06 15:19:38 +03:00
Sara Golemon
f4dfa851e2 Allow bin/bumpReleases to work with new major versions 2021-01-07 18:22:36 +00:00
Christoph M. Becker
37f8312ca2 Add missing title *only* to announcement page 2020-09-03 13:20:34 +02:00
Remi Collet
474a3c2767 add missing title on annoucement page 2020-09-03 12:20:47 +02:00
Derick Rethans
d20df9f8eb Announce 7.4.9 2020-08-06 11:15:40 +01:00
Sara Golemon
6b059e39cc Create releases/x_y_z.php from bin/createReleaseEntry 2020-06-18 13:57:51 +00:00
Sara Golemon
7971068c37 Refactor createNewsEntry for non-interactive use
Add bin/createReleaseEntry script for common release announcements
2020-06-17 22:04:52 +00:00
Peter Cowburn
4edd760ae9 use conference urls for cfp/announcements
The createNewsEntry script was recently refactored (thanks Sara!) and a
regression slipped through.

For conference news entries before the refactor, we used to generate the
"alternate" links along the lines of:
http://php.net/conferences/index.php#id2019-01-01-1

After the refactor, that changed to the following:
https://www.php.net/index.php#id2019-01-01-1

And with this commit they look like:
https://www.php.net/conferences/index.php#id2019-01-01-1
2019-07-23 20:23:53 +01:00
Sara Golemon
464ff738ba Refactor bin/createNewsEntry 2019-07-10 12:25:09 -04:00
Sara Golemon
576f18a126 Move recent release finding logic to branches.icn, clean up bumpRelease 2019-07-09 22:56:50 -04:00
Sara Golemon
aa1a61c557 Derive version and release date without global vars 2019-07-09 09:49:36 -04:00
Sara Golemon
563ed6e547 Use strict comparison 2019-07-09 09:34:45 -04:00
Sara Golemon
39200fe132 Make bin/bumpRelease relative to script, not invocation 2019-07-09 09:33:43 -04:00
Sara Golemon
498292a99c Add direct writing to bin/news2html 2019-06-05 14:25:33 -04:00
Sara Golemon
d8e2012418 Preserve CVE IDs when producing ChangeLog 2019-06-05 14:15:29 -04:00
Sara Golemon
c5052bab61 Clean up news2html a little 2019-06-05 14:08:30 -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
Christoph M. Becker
112c303735 Fix typo 2019-01-10 12:07:29 +01:00
Peter Kokot
190459c766 Refactor each() function to foreach()
The each() function has been deprecated since PHP 7.2 and shouldn't be
used anymore:
- http://php.net/manual/en/function.each.php
2018-11-17 06:40:34 +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
0f95b8c709 Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-10-17 07:29:46 +02:00
Sara Golemon
321007e06c Update bin/bumpReleases to handle minor versions 2018-08-20 12:23:29 -04:00
Peter Cowburn
02173eae56 set recommended maximum image height to 250px (was 400px) in bin/createNewsEntry 2018-03-14 22:41:51 +00:00
Peter Cowburn
4d64a90605 Merge branch 'pull-request/61' 2018-03-14 22:30:05 +00:00
Peter Cowburn
1c25572c7b pad category name in createNewsEmpty prompt
Changes the prompt from this:

Categories:
	0: frontpage	 [PHP.net frontpage news]
	1: releases	 [New PHP release]
	2: conferences	 [Conference announcement]
	3: cfp	 [Call for Papers]

To this:

Categories:
	0: frontpage  	 [PHP.net frontpage news]
	1: releases   	 [New PHP release]
	2: conferences	 [Conference announcement]
	3: cfp        	 [Call for Papers]
2017-04-15 23:01:12 +01:00
Eli White
2f2d99f80c Fixing a problem that existed with the News Creation tool. A formatting change that was thought to not affect anything functionally (changing some spacing of an option), ended up causing conference announcements to not appear on the website. 2017-04-15 10:29:48 -04:00
Eli White
c0b7f73efd Merge branch 'pr/83' - Adds the fix to the conference script disallowing a CfP and Conference announcement to be made at the same time. 2017-03-16 08:26:43 -04:00
Andreas Heigl
589a30929b Removes possibility to add CfP AND conference
This commit eliminates the possibility to add a conference AND a CfP in
one news. If you want to create both you will then have to create two
separate news. This makes it easier to get informations regarding CfP
and Conferences separate from one another
2015-10-09 21:12:33 +02:00
Sobak
8ad9357be2 Add missing quotes 2015-09-17 18:42:45 +02:00
Julien Pauli
17928997ee Usage of release_date() in Changelog template 2015-09-04 18:03:51 +02:00
Stelian, Mocanita
6fbd40c272 Added some validation calls for the createNewsEntry
Script now checks if the category is valid on submission.
Script now does a warning based check for the image size to avoid high-res images being pushed.
2015-02-25 12:05:41 +01:00
Stanislav Malyshev
3310b023f0 5.4.38 release 2015-02-19 08:57:25 +01:00
Stanislav Malyshev
cc36ed61f8 5.4.36 2014-12-18 18:17:01 -08:00