Page MenuHomeDevCentral

Configure PsySH to autoload
ClosedPublic

Authored by dereckson on Sun, Nov 2, 20:15.

Details

Summary

This change allows to run psysh from the root monorepo directory
and directly import any class from any of the Keruald libraries.

OmniTools provides such a configuration, but it's not available
when loaded from the monorepo.

Test Plan
$ psysh
Psy Shell v0.12.8 (PHP 8.4.14 — cli) by Justin Hileman
New version is available at psysh.org/psysh (current: v0.12.8, latest: v0.12.14)

> use Keruald\OmniTools\Collections\Vector;

> print_r((new Vector([1, 2, 3]))->bigrams())
Keruald\OmniTools\Collections\Vector Object
(
    [items:protected] => Array
        (
            [0] => Array
                (
                    [0] => 1
                    [1] => 2
                )

            [1] => Array
                (
                    [0] => 2
                    [1] => 3
                )

        )

)
= true

Diff Detail

Repository
rKERUALD Keruald libraries development repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson created this revision.
dereckson edited the test plan for this revision. (Show Details)
This revision is now accepted and ready to land.Sun, Nov 2, 20:16
This revision was automatically updated to reflect the committed changes.