PHP
Switch branches/tags
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc
src/SismoFinder
tests
vendor
.gitmodules
.travis.yml
CONTRIBUTORS.md
INSTALL.md
LICENSE
README.md
phpunit.xml.dist
sismo.config.php.dist

README.md

SismoFinder

Build Status

SismoFinder is a simple wrapper around the configuration file of Sismo. There are two major benefits when using SismoFinder as a replacement or addition to your Sismo configuration file.

The actual project's configuration for a Sismo project is saved within the project itself. Thus there is no need to setup each new project within Sismo.

The configuration for Sismo is shared among the collaborators of the project.

Installation

See INSTALL.md for instructions on how to install SismoFinder.

Configuration

SismoFinder by default looks for two files sismo.config.php and if not found sismo.config.php.dist.

  • Package the sismo.config.php.dist within your project.
  • Add the sismo.config.php to your .gitignore.

Example SismoFinder configuration file

This is a very basic example, how a distributed project configuration may look like, see Sismo README for more details.

<?php // /path/to/workspace/your-project/sismo.config.php.dist

return new Sismo\Project('Your Project (local)', __DIR__);

For more configuration examples take a look into the doc folder.

Usage

An example workspace at /Users/havvg/Web Development/. There is no need to include or require anything Sismo already provides, as the configuration is run inside of Sismo. For example, the UniversalClassLoader is defined.

The projects SismoFinder retrieves are easily accessible for further modifications.

Replacement

<?php // ~/.sismo/config.php

$loader = new Symfony\Component\ClassLoader\UniversalClassLoader();
$loader->registerNamespaces(array(
    'SismoFinder' => '/Users/havvg/Web Development/SismoFinder/src',
));
$loader->register();

$finder = new SismoFinder\Finder();
$finder->addWorkspace('/Users/havvg/Web Development');

return $finder->getProjects();

Addition

<?php // ~/.sismo/config.php

$loader = new Symfony\Component\ClassLoader\UniversalClassLoader();
$loader->registerNamespaces(array(
    'SismoFinder' => '/Users/havvg/Web Development/SismoFinder/src',
));
$loader->register();

// create a Growl notifier (for OSX)
$notifier = new Sismo\Notifier\GrowlNotifier('');

$finder = new SismoFinder\Finder();
$finder->addWorkspace('/Users/havvg/Web Development');

$projects = $finder->getProjects();

// A project outside of all workspaces
$projects[] = new Sismo\Project('Project D (local)', '/Users/havvg/Project D/', $notifier);

return $projects;

For more usage examples, see the examples in the doc folder.