Skip to content

fix: enqueue excluded, add local dev and ci - #122

Merged
kasparsd merged 21 commits into
masterfrom
tooling
Nov 15, 2025
Merged

fix: enqueue excluded, add local dev and ci#122
kasparsd merged 21 commits into
masterfrom
tooling

Conversation

@kasparsd

Copy link
Copy Markdown
Owner

Fixes #96

  • Add wp-env as local dep.
  • Switch from Travis to GH actions.

@kasparsd
kasparsd merged commit aa4dce2 into master Nov 15, 2025
1 check passed
@kasparsd
kasparsd deleted the tooling branch November 15, 2025 11:44
Comment thread src/minit-assets.php

if ( ! empty( $excluded ) ) {
// Merge with dependencies of excluded handles.
return array_merge( $excluded, $this->get_deps( $excluded ) );

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This now combines the excluded items with their deps.

@szepeviktor

Copy link
Copy Markdown
Contributor

@kasparsd Some PHPStan findings.

diff --git a/src/minit-asset-cache.php b/src/minit-asset-cache.php
index c0abf70..5b4eab6 100644
--- a/src/minit-asset-cache.php
+++ b/src/minit-asset-cache.php
@@ -146,7 +146,7 @@ class Minit_Asset_Cache {
    public function files() {
        $files = glob( $this->dir() . '/*', GLOB_NOSORT );

-       if ( ! empty( $files ) && is_array( $files ) ) {
+       if ( ! empty( $files ) ) {
            return $files;
        }

diff --git a/src/minit-plugin.php b/src/minit-plugin.php
index 4cc8b85..a7c3cbe 100644
--- a/src/minit-plugin.php
+++ b/src/minit-plugin.php
@@ -73,19 +73,19 @@ class Minit_Plugin {
    /**
     * Bump the cache version to bust the cache.
     *
-    * @return boolean
+    * @return void
     */
    public function cache_bump() {
-       return $this->minit_cache->bump();
+       $this->minit_cache->bump();
    }

    /**
     * Delete all the cache files.
     *
-    * @return boolean
+    * @return void
     */
    public function cache_purge() {
-       return $this->minit_cache->purge();
+       $this->minit_cache->purge();
    }

    public function init() {

@kasparsd

Copy link
Copy Markdown
Owner Author

Thank you @szepeviktor! I'll add phpstan soon!

Most of the code was written 10 years ago and I don't relate to a lot of choices made then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

minit_exclude_js & re-enqueue back to header

2 participants