You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,6 @@ src/ # Library source code
14
14
PslCacheNotFoundException.php # Thrown when no valid PSL cache is found
15
15
bin/
16
16
update-psl.php # Downloads and caches the Mozilla PSL (atomic writes, HTTP conditional)
17
-
reloadpsl # Shell wrapper to force PSL reload
18
17
data/
19
18
psl.cache.php # Bundled PSL cache (PHP array with NORMAL/WILDCARD/EXCEPTION keys)
20
19
psl.meta.json # HTTP metadata (ETag, Last-Modified) for conditional downloads
@@ -39,7 +38,7 @@ composer update-psl # Download fresh Mozilla Public Suffix List
39
38
40
39
## PHP Compatibility
41
40
42
-
Code must run on PHP 7.4 through 8.5. Do not use features exclusive to PHP 8.0+ (named arguments, match expressions, union type hints in signatures, enums, fibers, readonly properties, intersection types, `never` return type, first-class callable syntax).
41
+
Code must run on PHP 8.2 through 8.5. PHP 8.2+ language features are available: union types, named arguments, `match` expressions, enums, `readonly`, constructor promotion, intersection types, `never` return type, first-class callable syntax, and `#[Attribute]` syntax.
43
42
44
43
## Key Architecture
45
44
@@ -97,7 +96,7 @@ XOOPS has two major generations with different APIs. Code must support both:
97
96
98
97
1. Code follows PSR-12 and passes `composer lint`.
99
98
2. Static analysis passes `composer analyse` with no new errors.
100
-
3. Tests pass on all supported PHP versions (7.4-8.5).
99
+
3. Tests pass on all supported PHP versions (8.2-8.5).
101
100
4. New public methods have PHPDoc with `@param`, `@return`, and `@throws` tags.
102
101
5. New functionality has corresponding unit tests.
* Fix `getPublicSuffix()` PSL exception-rule handling — exception branch returned one label too many; now correctly returns the exception rule minus its leftmost label (e.g. `!city.kawasaki.jp` yields public suffix `kawasaki.jp`, not `city.kawasaki.jp`)
@@ -13,7 +20,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
13
20
* Fix `normalizeDomain()` crash on empty string — `idn_to_ascii('')` throws `ValueError` on PHP 8.4+; added `$domain !== ''` guard
14
21
* Fix PSL exception tests referencing `parliament.uk` (removed from the PSL); replaced with stable entries (`www.ck`, `city.kawasaki.jp`)
15
22
* Fix `bin/update-psl.php` failing when run standalone on PHP 7.4 — `str_starts_with()` was called without loading the polyfill autoloader
16
-
* Fix `bin/reloadpsl` calling removed methods (`clearDataDirectory()`, `getTree()`); rewritten as a simple wrapper
17
23
* Fix `getMetadata()` unreachable statement
18
24
19
25
### Security
@@ -24,13 +30,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
24
30
25
31
### Changed
26
32
* Make `normalizeDomain()` a `private static` method (was instance method)
27
-
* Replace `strpos()`/`substr()` patterns with `str_contains()`/`str_starts_with()`/`str_ends_with()`via `symfony/polyfill-php80`
33
+
* Replace `strpos()`/`substr()` patterns with `str_contains()`/`str_starts_with()`/`str_ends_with()`(native in PHP 8.0)
28
34
* Add `@throws PslCacheNotFoundException` PHPDoc tags to `PublicSuffixList::__construct()` and `loadRules()`
29
35
* Add XOOPS copyright headers to all source files
30
36
* Clarify `README.md` license section — library code is Apache-2.0, bundled PSL data is MPL-2.0
31
37
32
38
### Added
33
-
* Add `symfony/polyfill-php80` dependency for `str_contains`, `str_starts_with`, `str_ends_with` on PHP 7.4
34
39
* Add `ext-intl` to `suggest` in `composer.json`
35
40
36
41
### Tests
@@ -49,14 +54,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
49
54
* Add Composer autoloader bootstrap to `bin/update-psl.php` for standalone execution
* Remove `xsi:noNamespaceSchemaLocation` from `phpunit.xml.dist` to avoid XSD validation warnings on PHPUnit 9; `<source>` element works natively on PHPUnit 10+/11+
64
+
* Convert test `@dataProvider` annotations to PHPUnit 11 `#[DataProvider]` attributes
65
+
* Convert test `@requires` annotations to `#[RequiresPhpExtension]` attributes
66
+
* Add PHPUnit 11 XSD schema and `cacheDirectory` to `phpunit.xml.dist`
60
67
* Standardize `.gitattributes` with LF enforcement and export-ignore list
61
68
* Standardize `.gitignore` with local config overrides, build artifacts, PHPUnit cache
62
69
* Track `phpcs.xml` in version control (was previously untracked, causing CI lint failure)
@@ -173,7 +180,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
0 commit comments