Skip to content

Commit 6709f9a

Browse files
authored
Merge pull request #35 from tattersoftware/release
Release Docs
2 parents 7ace5a2 + 7b85e24 commit 6709f9a

File tree

3 files changed

+23
-4
lines changed

3 files changed

+23
-4
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
Asset handling for CodeIgniter 4
44

5-
[![](https://github.com/tattersoftware/codeigniter4-assets/workflows/PHPUnit/badge.svg)](https://github.com/tattersoftware/codeigniter4-assets/actions?query=workflow%3A%22PHPUnit)
6-
[![](https://github.com/tattersoftware/codeigniter4-assets/workflows/PHPStan/badge.svg)](https://github.com/tattersoftware/codeigniter4-assets/actions?query=workflow%3A%22PHPStan)
7-
[![Coverage Status](https://coveralls.io/repos/github/tattersoftware/codeigniter4-assets/badge.svg?branch=develop)](https://coveralls.io/github/tattersoftware/codeigniter4-assets?branch=develop)
5+
[![](https://github.com/tattersoftware/codeigniter4-assets/workflows/PHPUnit/badge.svg)](https://github.com/tattersoftware/codeigniter4-assets/actions/workflows/test.yml)
6+
[![](https://github.com/tattersoftware/codeigniter4-assets/workflows/PHPStan/badge.svg)](https://github.com/tattersoftware/codeigniter4-assets/actions/workflows/analyze.yml)
7+
[![](https://github.com/tattersoftware/codeigniter4-assets/workflows/Deptrac/badge.svg)](https://github.com/tattersoftware/codeigniter4-assets/actions/workflows/inspect.yml)
8+
[![Coverage Status](https://coveralls.io/repos/github/tattersoftware/codeigniter4-assets/badge.svg?branch=develop)](https://coveralls.io/github/organization/name?branch=develop)
89

910
## Quick Start
1011

UPGRADING.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Upgrade Guide
2+
3+
## Version 2 to 3
4+
***
5+
6+
> Note: This is a complete refactor! Please be sure to read the docs carefully before upgrading.
7+
8+
* The services no longer exist; remove all references to `Services::Assets` and `Services::manifests` to avoid exceptions
9+
* This library no longer publishes Assets; convert Manifests to the framework's new [Publisher format](https://codeigniter.com/user_guide/libraries/publisher.html)
10+
* Many of the example Manifests now have an official Publisher equivalent at [Tatter\Frontend](https://github.com/tattersoftware/codeigniter4-frontend)
11+
* The `DirectoryHandler` (mapping public directories to routes) has no equivalent in `v3` so be sure to create explicit bundles and routes for any you were using
12+
* The view files have been removed and replaced by `AssetsFilter` to handle tag injection directly; read the docs on setting up the filter
13+
14+
For an example of converting a `v2` JSON manifest to a `v3` framework Publisher compare these files:
15+
16+
* https://github.com/tattersoftware/codeigniter4-assets/blob/267220d437786e0ddb9d7681745f5942d95c543b/manifests/FontAwesome.json
17+
* https://github.com/tattersoftware/codeigniter4-frontend/blob/ae61773f279333c3a606498364977a8cec45d303/src/Publishers/FontAwesomePublisher.php

src/RouteBundle.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ public static function createFromRoute(string $uri): self
5656
}
5757
}
5858

59-
if (isset($key)) {
59+
// Re-check the config in case one of the included items requested cache exemption
60+
if ($config->useCache && isset($key)) {
6061
cache()->save($key, $bundle);
6162
}
6263

0 commit comments

Comments
 (0)