Mark PHP version compatibility fallback as legitimate in Php_Fixer
Add public directory asset support to bundle system Fix PHP Fixer to replace ALL Rsx\ FQCNs with simple class names 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -118,6 +118,77 @@ INCLUDE TYPES
|
||||
External resources:
|
||||
'cdn:https://unpkg.com/library.js'
|
||||
|
||||
Public Directory Assets
|
||||
Static assets from public/ directories with automatic cache-busting:
|
||||
'/public/sneat/css/core.css'
|
||||
'/public/sneat/js/helpers.js'
|
||||
|
||||
These resolve to files in any public/ directory in rsx/. Resolution
|
||||
cached in Redis for performance. Generates tags with filemtime() for
|
||||
fresh cache-busting on each page render.
|
||||
|
||||
PUBLIC ASSET INCLUDES
|
||||
Bundles can include static assets from any public/ directory with
|
||||
automatic cache-busting via filemtime().
|
||||
|
||||
SYNTAX
|
||||
Prefix paths with /public/ in bundle includes:
|
||||
|
||||
'include' => [
|
||||
'/public/sneat/css/core.css',
|
||||
'/public/sneat/js/helpers.js',
|
||||
]
|
||||
|
||||
RESOLUTION
|
||||
Path "sneat/css/demo.css" resolves to first match across all public/
|
||||
directories in manifest. Resolution cached in Redis indefinitely.
|
||||
|
||||
Searches:
|
||||
rsx/public/sneat/css/demo.css
|
||||
rsx/app/admin/public/sneat/css/demo.css
|
||||
rsx/theme/public/sneat/css/demo.css
|
||||
... (all public/ directories)
|
||||
|
||||
OUTPUT
|
||||
CSS: <link rel="stylesheet" href="/sneat/css/demo.css?v={filemtime}">
|
||||
JS: <script src="/sneat/js/helpers.js?v={filemtime}" defer></script>
|
||||
|
||||
The filemtime() call executes on each page render, providing fresh
|
||||
cache-busting timestamps without rebuilding bundles.
|
||||
|
||||
ORDERING
|
||||
Public assets output with CDN includes, before compiled bundle code.
|
||||
Order preserved as listed in bundle definition:
|
||||
|
||||
1. CDN CSS assets
|
||||
2. Public directory CSS
|
||||
3. Compiled bundle CSS
|
||||
4. CDN JS assets
|
||||
5. Public directory JS
|
||||
6. Compiled bundle JS
|
||||
|
||||
AMBIGUITY ERRORS
|
||||
If multiple files match the same path, compilation fails:
|
||||
|
||||
RuntimeException: Ambiguous public asset request:
|
||||
'sneat/css/demo.css' matches multiple files:
|
||||
'rsx/public/sneat/css/demo.css',
|
||||
'rsx/theme/public/sneat/css/demo.css'
|
||||
|
||||
Solution: Use more specific paths or rename files to avoid conflicts.
|
||||
|
||||
CACHING
|
||||
- Path resolution cached in Redis indefinitely
|
||||
- Cache validated on each use (file existence check)
|
||||
- Stale cache automatically re-scanned
|
||||
- filemtime() executes on each page render for cache-busting
|
||||
|
||||
RESTRICTIONS
|
||||
- Only .js and .css files allowed
|
||||
- Must start with /public/ prefix
|
||||
- Files must exist in a public/ directory
|
||||
- No PHP files allowed (security)
|
||||
|
||||
BUNDLE RENDERING
|
||||
In Blade layouts/views:
|
||||
{!! Dashboard_Bundle::render() !!}
|
||||
|
||||
Reference in New Issue
Block a user