Ambrose Casanova
eac9fef021
feat: make view path containment opt-in with View::$restrictToPath
...
Restore getTemplate() and its existing test exactly as on master. Default behavior is unchanged: absolute paths still render and exists() never throws. With restrictToPath on, render(), fetch() and exists() only accept files that resolve inside the views path. A blocked file has its own error message, separate from "not found".
3 days ago
Ambrose Casanova
8093a18fb3
fix: reject Windows view paths that leave the views directory
...
Normalize both separators before the containment check, and build the regression next to the views directory so it stays on the same drive.
5 days ago
Ambrose Casanova
63e5bcd613
fix: keep view templates inside the views directory
...
Reject absolute template paths and any resolved path outside the configured views directory.
5 days ago
n0nag0n
24640dcbcb
Merge pull request #727 from flightphp/fix-726-fetchfield-null
...
fix: return false from fetchField on empty result
1 month ago
Ambrose Casanova
9681cd20c8
test: tolerate PDO numeric strings on PHP < 8.1
...
assertEquals for integer-ish fetchField values; keep assertSame for
false / empty string and assertNull for SQL NULL.
1 month ago
n0nag0n
241541b995
Merge pull request #728 from flightphp/fix-ghsa-r8g9-view-e
...
fix: escape single quotes in View::e()
1 month ago
Ambrose Casanova
386bdc16a7
test: cover fetchField null vs empty vs 0 vs ''
...
Distinguish empty result sets (false) from SQL NULL columns (null),
and keep 0 / '' as assertSame on both PdoWrapper and SimplePdo.
1 month ago
Ambrose Casanova
e42c7848c4
fix: return false from fetchField on empty result
...
SimplePdo::fetchRow() returns null when there are no rows. Guard
PdoWrapper::fetchField() so empty queries return false instead of
calling getData() on null. Closes #726 .
1 month ago
Ambrose Casanova
6b8d2f9880
fix: escape single quotes in View::e()
...
Pass ENT_QUOTES|ENT_SUBSTITUTE and UTF-8 to htmlentities so single-quoted
attributes are escaped on PHP 7.4/8.0 as well as 8.1+.
1 month ago
n0nag0n
a406f917e8
Merge pull request #724 from flightphp/update-readme-logos-srcsets
...
Update logo image sources in README.md
1 month ago
n0nag0n
f617b5c2f6
Merge pull request #725 from flightphp/restore-path-autoloader
...
Restore Flight::path() autoloading broken in 3.19
1 month ago
Ambrose Casanova
13af0cb63c
Do not add the package root to Loader::$dirs under Composer.
...
files autoload still registers Loader::autoload() so Flight::path() works. Composer PSR-4 already loads flight\*. Reset leftover path() dirs in AutoloadTest so LoaderTest can assert the exact list.
1 month ago
Ambrose Casanova
2880142083
Restore Flight::path() autoloading after the 3.19 autoload rework.
...
PR 709 dropped the Composer files entry for flight/autoload.php and that file returned early when vendor/autoload.php existed, so Loader::autoload() never registered. path() still added directories; namespaced app classes never loaded. Upgrades must not break that.
1 month ago
fadrian06
25e54f2252
Update logo image sources in README.md
1 month ago
n0nag0n
71de031cef
Merge pull request #719 from flightphp/add-logo-in-readme
...
Update README with responsive logo images
1 month ago
n0nag0n
d332b453c0
Merge pull request #721 from flightphp/dispatcher-rework
...
Refactor Dispatcher to improve type hints and simplify callable handling
1 month ago
n0nag0n
b26dc67adc
Merge pull request #723 from flightphp/loader-rework
...
Refactor and improve Loader documentation and properties
1 month ago
copilot-swe-agent[bot]
6a127b1f0f
Clarify setV2ClassLoading() docblock to explain true/false behaviour
...
Co-authored-by: fadrian06 <109766973+fadrian06@users.noreply.github.com>
2 months ago
fadrian06
89c378cc94
fix constructor arguments typehint
...
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2 months ago
fadrian06
2fac34fbb7
refactor Loader@autoload, Loader@addDirectory and Loader@setV2ClassLoading
2 months ago
fadrian06
77e68ea77b
improve Loader@reset docblock
2 months ago
fadrian06
89a9decc0b
improve Loader@get docblock
2 months ago
fadrian06
09e222c0fa
simplify Loader@newInstance
2 months ago
fadrian06
5a83743cc7
simplify Loader@getInstance docblock
2 months ago
fadrian06
712792006f
refactor Loader@load with better names and docblock
2 months ago
fadrian06
1519e0cf30
improve Loader@unregister $name param docblock
2 months ago
fadrian06
d9406bbf24
improve Loader@register docblocks
2 months ago
fadrian06
ff5e90c592
define class factory callable arguments typehint
2 months ago
fadrian06
d9b01781e6
rewrite Loader docblock
2 months ago
fadrian06
6acbdb2082
refactor Loader@load
2 months ago
fadrian06
d196cc09e1
format Loader@register and Loader@unregister docblocks
2 months ago
fadrian06
85f5431a40
reduce loader classes property docblock line length
2 months ago
fadrian06
7f1b976ca1
simplify loader properties typehints
2 months ago
fadrian06
30193dedac
compact loader properties docblocks
2 months ago
fadrian06
8523025cb5
rewrap loader description
2 months ago
fadrian06
1a8af5c96b
Merge branch 'master' into dispatcher-rework
2 months ago
n0nag0n
112796ec42
Merge pull request #718 from flightphp/replace-table-with-chart-in-readme
...
Replace frameworks comparison table with Mermaid bar chart in README
2 months ago
n0nag0n
cb27287bbc
Merge branch 'master' into replace-table-with-chart-in-readme
2 months ago
n0nag0n
5372672332
Merge pull request #722 from flightphp/eventdispatcher-rework
...
Simplify EventDispatcher methods and remove redundant descriptions
2 months ago
n0nag0n
240556e92b
Merge pull request #720 from flightphp/improve-@copyright-and-@license
...
Normalize and simplify @copyright and @license PHPDoc tags
2 months ago
n0nag0n
7fc6fc1eee
Merge pull request #717 from flightphp/improve-readme-design
...
Improve format and clarity in README.md
2 months ago
n0nag0n
df93b904f3
Merge pull request #715 from flightphp/psr12-ai-coding-standards
...
Update documentation for PSR-12 code formatting instructions
2 months ago
n0nag0n
73a5387b70
Merge pull request #716 from flightphp/update-contributing-guidelines
...
Update coding standards to PSR12 and improve CONTRIBUTING.md
2 months ago
fadrian06
cd3d8bb44e
simplify EventDispatcher@removeAllListeners and resetInstance
2 months ago
fadrian06
4cb50f66ab
simplify EventDispatcher@removeListener
2 months ago
fadrian06
6c22bad3f0
remove redundant explanation of EventDispatcher@getAllRegisteredEvents
2 months ago
fadrian06
361e45e974
simplify EventDispatcher@getListeners
2 months ago
fadrian06
4abcd23e11
use EventDispatcher@hasListeners in trigger
2 months ago
fadrian06
6bc62d9b0c
simplify EventDispatcher@hasListeners
2 months ago
fadrian06
0d50ed97d6
use early returns in EventDispatcher@trigger
2 months ago