2017 © Pedro Peláez
 

library pimpledumper

Easy way to auto create pimple.json and .phpstorm.meta.php for Pimple Container

image

jbzoo/pimpledumper

Easy way to auto create pimple.json and .phpstorm.meta.php for Pimple Container

  • PHP
  • 5 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 9 Versions
  • 25 % Grown

The README.md

JBZoo PimpleDumper Build Status Coverage Status

Simple way to auto create pimple.json and .phpstorm.meta.php

License Latest Stable Version Scrutinizer Code Quality, (*1)

Install

composer require jbzoo/pimpledumper

Install and activate Silex Plugin in PhpStorm settings, (*2)

Usage

<?php
require_once './vendor/autoload.php'; // composer autoload.php

// Get needed classes
use JBZoo\PimpleDumper\PimpleDumper;
use Pimple\Container;

// Init container
$container = new Container();
$container['somekey'] = function() {
    return new SomeClass(); 
};

// Auto dump pimple.json on PimpleDumper destructor (or PHP die)
$container->register(new PimpleDumper()); // register service

// Manually (in the end of script!)
$dumper = new PimpleDumper();
$dumper->dumpPimple($container); // Create new pimple.json 
$dumper->dumpPimple($container, true); // Append to current pimple.json 
$dumper->dumpPhpstorm($container); // Create new .phpstorm.meta.php (experimental!)

Output example

pimple.json, (*3)

[
    {
        "name": "somekey",
        "type": "class",
        "value": "SomeClass"
    }
]

.phpstorm.meta.php (experimental!), (*4)

<?php
/**
 * ProcessWire PhpStorm Meta
 *
 * This file is not a CODE, it makes no sense and won't run or validate
 * Its AST serves PhpStorm IDE as DATA source to make advanced type inference decisions.
 * 
 * @see https://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Advanced+Metadata
 */

namespace PHPSTORM_META {

    $STATIC_METHOD_TYPES = [
        new \Pimple\Container => [
            '' == '@',
            'somekey' instanceof SomeClass,
        ],
    ];

}

Result

Result of JBZoo/PimpleDumper, (*5)

Unit tests and check code style

make
make test-all

License

MIT, (*6)

The Versions

14/11 2017

dev-master

9999999-dev

Easy way to auto create pimple.json and .phpstorm.meta.php for Pimple Container

  Sources   Download

MIT

The Requires

  • php >=5.3.10

 

The Development Requires

container silex autocomplete di arrayaccess pimple phpstorm idea

14/11 2017

1.2.2

1.2.2.0

Easy way to auto create pimple.json and .phpstorm.meta.php for Pimple Container

  Sources   Download

MIT

The Requires

  • php >=5.3.10

 

The Development Requires

container silex autocomplete di arrayaccess pimple phpstorm idea

01/08 2016

dev-develop

dev-develop

Easy way to auto create pimple.json and .phpstorm.meta.php for Pimple Container

  Sources   Download

MIT

The Requires

  • php >=5.3.10

 

The Development Requires

container silex autocomplete di arrayaccess pimple phpstorm idea

30/06 2016

1.2.1

1.2.1.0

Easy way to auto create pimple.json and .phpstorm.meta.php for Pimple Container

  Sources   Download

MIT

The Requires

 

The Development Requires

container silex autocomplete di arrayaccess pimple phpstorm idea

12/04 2016

1.2.0

1.2.0.0

Easy way to auto create pimple.json and .phpstorm.meta.php for Pimple Container

  Sources   Download

MIT

The Requires

 

The Development Requires

container silex autocomplete di arrayaccess pimple phpstorm idea

17/03 2016

1.1.0

1.1.0.0

Easy way to auto create pimple.json and .phpstorm.meta.php for Pimple Container

  Sources   Download

MIT

The Requires

 

The Development Requires

container silex autocomplete di arrayaccess pimple phpstorm idea

05/03 2016

1.0.2

1.0.2.0

Easy way to auto create pimple.json and .phpstorm.meta.php for Pimple Container

  Sources   Download

MIT

The Requires

 

The Development Requires

container silex autocomplete di arrayaccess pimple phpstorm idea

03/03 2016

1.0.1

1.0.1.0

Easy way to auto create pimple.json and .phpstorm.meta.php for Pimple Container

  Sources   Download

MIT

The Requires

  • php >=5.3.10

 

The Development Requires

container silex autocomplete di arrayaccess pimple phpstorm idea

03/03 2016

1.0.0

1.0.0.0

Easy way to auto create pimple.json and .phpstorm.meta.php for Pimple Container

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

container silex autocomplete di arrayaccess pimple phpstorm idea