Giter VIP home page Giter VIP logo

zf-app-blank's Introduction

zf-app-blank

Latest Stable Version Latest Unstable Version License Build Status Coverage Status

Autoloading standart PSR-4. Coding standart PSR-2.

zf-app-blank

TODO

  • Refactoring code to PHP 7.1.
  • Add PHP tests.

Features

Installation

  • Download and unpack the repository.

  • Install Vagrant

  • Install plugins for Vagrant:

$ vagrant plugin install vagrant-vbguest
$ vagrant plugin install vagrant-hostmanager
  • Run install the work environment:
$ vagrant up
  • Paste GitHub token in /workenv/config/vagrant-local.yml

  • Run again:

$ vagrant up
  • Configure Mailgun in /config/autoload/local.php:

You should create Mailgun account if you didn't do it before. Also, create Postbin.

'mailgun' => [
    'key' => 'key-somekey',
    'endpoint' => 'http://bin.mailgun.net/somekey',
],
'mail' => [
    'domain' => 'somesudomain.mailgun.org',
],
  • Create scheme:
$ vagrant ssh -c 'php bin/console orm:schema-tool:create'
  • Done.

Testing

Run tests:

$ vagrant ssh -c 'composer test:build'
$ vagrant ssh -c 'composer test:run'

License

zf-app-blank is released under the BSD 3-Clause License.

zf-app-blank's People

Contributors

beaten-sect0r avatar bupy7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

zf-app-blank's Issues

Integration Symfony CLI

// bin/console

#!/usr/bin/env php
<?php

use Zend\Mvc\Application;
use Symfony\Component\Console\Application as Cli;
use Zend\Json\Json;

chdir(dirname(__DIR__));

// Setup autoloading
require_once 'vendor/autoload.php';

// Include constants of application
defined('APP_ENV') or define('APP_ENV', 'dev');
defined('APP_DEBUG') or define('APP_DEBUG', true);
require_once 'config/constants.php';

// init main application
$app = Application::init(require 'config/application.config.php');

// configuration cli application
$composerConfig = Json::decode(file_get_contents('composer.json'));
$cli = new Cli($composerConfig->name, $composerConfig->version);
/** @var \Application\Options\CliOptions $cliConfig */
$cliConfig = $app->getServiceManager()->get('Application\Options\CliOptions');
foreach ($cliConfig->getCommands() as $command) {
    $cli->add($app->getServiceManager()->get($command));
}

// adding doctrine commands
/** @var Cli $doctrineCli */
$doctrineCli = $app->getServiceManager()->get('doctrine.cli');
$cli->setHelperSet($doctrineCli->getHelperSet());
foreach ($doctrineCli->all() as $command) {
    $cli->add($command);
}

// run cli
$cli->run();

Added QueryDataProvider

In my project has QueryDataProvider for search with pagination and etc. This provider need to add here.

Doctrine proxy config

Add:

'configuration' => [
            'orm_default' => [
                'proxy_dir' => 'data/runtime/DoctrineORMModule/Proxy'
            ],
 ],

vagrant up: "The box 'debian/jessie64' could not be found"

я не сильно разбираюсь в vagrant, но по readme не запускается.

жду помощи.
хочется запустить, пощупать.

vagrant up
Bringing machine 'zf-app-blank' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:

vm:
* The box 'debian/jessie64' could not be found.
* It appears your machine doesn't support NFS, or there is not an
adapter to enable NFS on this machine for Vagrant. Please verify
that `nfsd` is installed on your machine, and try again. If you're
on Windows, NFS isn't supported. If the problem persists, please
contact Vagrant support.

Fix command manager provider

<?php

namespace Cli\Manager\Provider;

interface CommandManagerProviderInterface
{
    public function getCommandManagerConfig(): array;
}

Fix assetic and disable for prod by default

'invokables' => [
     'AsseticCacheBuster' => \AsseticBundle\CacheBuster\LastModifiedStrategy::class,
],

to

use AsseticBundle\CacheBuster\LastModifiedStrategy;
use AsseticBundle\CacheBuster\<Some Dummy Class>;

'factories' => [
     'AsseticCacheBuster' => !APP_ENV_PROD ? LastModifiedStrategy::class : <Some Dummy Class>,
],

Problems on Installation

( ! ) Fatal error: Uncaught Assetic\Exception\FilterException: An error occurred while running: '/usr/local/bin/sass' '--load-path' '/vagrant/module/Core/config/../assets/css' '--cache-location' '/tmp' '/tmp/assetic_sasszYSYr5' Error Output: sh: 1: /usr/local/bin/sass: not found Input: // libraries @import "../../../../node_modules/bootstrap/scss/bootstrap" @import "../../../../node_modules/font-awesome/scss/font-awesome" // core styles @import "404" @import "base" in /vagrant/vendor/kriswallsmith/assetic/src/Assetic/Exception/FilterException.php on line 40

Assetic\Exception\FilterException: An error occurred while running: '/usr/local/bin/sass' '--load-path' '/vagrant/module/Core/config/../assets/css' '--cache-location' '/tmp' '/tmp/assetic_sasszYSYr5' Error Output: sh: 1: /usr/local/bin/sass: not found Input: // libraries @import "../../../../node_modules/bootstrap/scss/bootstrap" @import "../../../../node_modules/font-awesome/scss/font-awesome" // core styles @import "404" @import "base" in /vagrant/vendor/kriswallsmith/assetic/src/Assetic/Exception/FilterException.php on line 40

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.