1
0
mirror of https://github.com/php/phd.git synced 2026-03-24 15:12:18 +01:00

25 Commits

Author SHA1 Message Date
Louis-Arnaud
7366bc9f2a refactor: replace trigger_error(E_USER_ERROR) with exceptions (PHP 8.4 compatibility) (#218)
Co-authored-by: lacatoire <louis-arnaud.catoire@external.drivalia.com>
2026-01-09 02:09:58 +00:00
Anna Filina
deb7d81c49 Remove references to PDF from docs and code comments 2025-11-04 06:15:12 +00:00
haszi
d611e64fb1 Fix PHPDoc Return types 2025-01-14 12:16:32 +00:00
haszi
b80ae36dba Change property names to camel case 2024-12-29 19:58:10 +00:00
haszi
b8e817b6ff Replace method calls with property access 2024-12-29 19:58:10 +00:00
haszi
15284136ff Separate regular PhD output from error handling (#176)
- Move error handling code into a class and remove PhD message output handling from it.
- Introduce a new class to handle PhD message output.
- Make the implicit dependency on the output functionality of classes explicit.
- Update PEAR package.xml.
- Fix tests.
- Use proper variadic parameters
- Use class constants
- Use first-class callable syntax

---------

Co-authored-by: haszi <haszika80@gmail.com>
2024-11-10 17:57:05 +00:00
haszi
0364e4f969 Use trigger_error for errors (#174)
Co-authored-by: haszi <haszika80@gmail.com>
2024-10-29 14:11:27 +00:00
Kamil Tekiela
2852b2756c Remove some dead code (#163) 2024-10-20 13:34:46 +02:00
haszi
75bf5fb8b2 Show actual default PhD settings (#150)
Co-authored-by: haszi <haszika80@gmail.com>
2024-09-11 13:46:58 +01:00
haszi
5c462401bd Remove output directory creation from render.php (#119)
Co-authored-by: haszi <haszika80@gmail.com>
2024-04-28 04:06:57 +01:00
haszi
e6e6847d7b Refactor Options Parser and default Options Handler (#110)
* Refactor Options Parser and default Options Handler

Refactor default Options Handler to accept dependencies through its constructor.
Refactor default Options Handler to return an array of options instead of directly setting options in Config and declare array return types.
Refactor method in Options Parser to return an array of options and declare its return type as array.
Inject all necessary dependencies in render.php.
Refactor two methods in default Options Handler by using match expressions.

* Minor refactor of files used in tests

Inlcude Config with require_once instead of require in Autloader.
Define __INSTALLDIR__ only if it is not defined yet in render.php.
Include Autoloader and functions.php with require_once instead of require.
Remove unnecessary __PHPDIR__ constant, correct path for __INSTALLDIR__ and use that constant in setup.php.

* Remove var_dump from Options Parser

* Fix inconsistent option flags in default Option Handler

* Add default Options Handler tests

---------

Co-authored-by: haszi <haszika80@gmail.com>
2024-03-17 18:29:43 +00:00
haszi
efea0458c0 Refactor Options Handler, Interface and Parser (#107)
Co-authored-by: haszi <haszika80@gmail.com>
2024-03-07 14:29:57 +00:00
haszi
e5b8bf35a9 Remove file ending comment blocks (#92)
Co-authored-by: haszi <haszika80@gmail.com>
2024-02-08 12:46:21 +00:00
Peter Kokot
3564283891 Sync final newlines
This patch adds some missing newlines and trims multiple redundant
newlines into a single newline.

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-02 06:23:33 +02:00
Sobak
aecae4e2c3 Eliminate $ comments 2015-03-09 06:20:39 +01:00
Hannes Magnusson
37a0e4268d WS :) 2012-06-09 17:33:56 +01:00
Hannes Magnusson
ccb9cd2834 Fixed bug#47392 Option to specify filename for bightmls 2012-04-06 11:39:14 -07:00
Hannes Magnusson
9c1fa3647f Show individual package version in --version 2012-04-06 06:30:47 -07:00
Hannes Magnusson
34293c9a6e Lets not try creating the dir if it already exists
# Removes the annoying warning when running with xdebug.scream
2011-08-31 13:17:44 +00:00
Moacir de Oliveira Miranda Júnior
24038df4fd Do not automatically add package dirs, use the option --packagedir instead
* New option --packagedir (-k) <path> to run an external package
2011-05-29 15:56:43 +00:00
Hannes Magnusson
08b967488d Add --memoryindex (-M) to just store the index in memory
# couple of percentages less :)
2011-04-27 18:33:37 +00:00
Richard Quadling
8e9d5c0d65 Added --quit option to quit after processing command line params. Useful when used with --saveconfig to just save the config. 2011-03-16 12:38:23 +00:00
Moacir de Oliveira Miranda Júnior
6a3eb37f6b adding function Config::copyright(), uses date('Y') in the current year 2011-03-08 20:06:38 +00:00
Richard Quadling
171311b130 Do not disable color configuration settings when loading from phd.config.php on Windows when saved setting is enabled. 2011-02-03 17:36:30 +00:00
Moacir de Oliveira Miranda Júnior
e832bd9782 adding support for package options 2010-09-09 02:37:28 +00:00