These are chat archives for COCOPi/cockpit

3rd
Feb 2015
HamGuy
@HamGuy
Feb 03 2015 03:33
Well, my fault, after create a new vagrant box, it works well now! Thanks!
Maxim
@Big-Shark
Feb 03 2015 04:26
@aheinze Why you do not use all the power of the composer, and party packages are stored in a repository?
Artur
@aheinze
Feb 03 2015 07:56
@HamGuy great to hear :+1:
Artur
@aheinze
Feb 03 2015 08:04
@Big-Shark cockpit doesn’t have that much dependencies… right now cockpit has a pretty clean vendor folder with only the needed files/classes without any docs/test/examples folders for each dependency which also get downloaded via composer . but I also understand the arguments for composer. I’ll rethink using/integrate composer as the project might grow.
Julien Tant
@JulienTant
Feb 03 2015 08:04
I'm trying to find out if i can integrate your tool into Laravel right now
And it's not as easy as it seems ^^
Artur
@aheinze
Feb 03 2015 08:05
@JulienTant what problems are you facing?
Julien Tant
@JulienTant
Feb 03 2015 08:06
Ideally, i want like to put cokpit into a package, so poeple can juste "composer require" the package
i'm trying to find how can i use Laravel routing with cockpit
maybe i need to create some kind of wrapper
would like*
Artur
@aheinze
Feb 03 2015 08:07
but cockpit isn’t a library
as I know in composer you can only define one vendor for all dependencies
can’t you use composer scripts?
Maxim
@Big-Shark
Feb 03 2015 08:10
@aheinze RedisLite this is cache class or storage class?
Julien Tant
@JulienTant
Feb 03 2015 08:10
maybe, i need to find a way to copy cockpit into public OR to pass iinformation from Laravel's routing to cockpit
and keep cockpit isolated into a package
Artur
@aheinze
Feb 03 2015 08:11
https://getcomposer.org/doc/articles/scripts.md
{
    "scripts": {

        "post-package-install-cmd": [
            "composer create-project aheinze/cockpit cockpit --stability="dev"
        ]
    }
}
@Big-Shark RedisLite is only used for caching … I’ll make it exchangable with native Redis like MongoLite/MongoDb
Maxim
@Big-Shark
Feb 03 2015 08:15
@aheinze Why not use a other packages that represent a larger list of drivers?
Artur
@aheinze
Feb 03 2015 08:25
did you also ask each of the authors why don’t use one of the other ones? ;-)
maybe I’ll replace some helpers/components in the future. right now I’m pretty happy with the current setup
Julien Tant
@JulienTant
Feb 03 2015 08:30
i'm curious about how you use it @aheinze
Maxim
@Big-Shark
Feb 03 2015 08:30
@aheinze It's good for you, but it's not always good for us. )
Julien Tant
@JulienTant
Feb 03 2015 08:31
//cockpit
//frontend
?
Or do you put cockpit into a 'admin' folder?
of something like this
Artur
@aheinze
Feb 03 2015 08:34
@Big-Shark you can replace cockpits cache helper easily with your own
@JulienTant yes I use cockpit as a admin subfolder in the webroot
Maxim
@Big-Shark
Feb 03 2015 08:39
@aheinze you don't use interface and it creates some inconvenience when replacing. I modified the code in some places, and now I use radis, but i this modified cms code is not good idea.
Artur
@aheinze
Feb 03 2015 08:50
no need to modify core source code:
<?php

// custom/config.php

return [
    'cachesettings' => [ /* ... */] // custom redis settings
];


// custom/bootstrap.php

$app->helpers['cache'] = 'MyCacheClass';


class MyCacheClass extends Lime\Helper {

    public function initialize(){
        $this->driver = new Whatever\Library\Cache($this->app['app.config/cachesettings']);
    }

    public function write($key, $value, $duration = -1){
        $this->driver->write($key, $value);
    }

    public function read($key, $default=null){
        return $this->driver->read($key);
    }

    public function delete($key){
        $this->driver->delete($key);

    }

    public function clear(){
        $this->driver->clear();
    }
}
config.php + bootstrap.php must be created in the custom folder
Maxim
@Big-Shark
Feb 03 2015 08:55
@aheinze thx
@aheinze Why Versions class not use $app->service('memory') ?
Artur
@aheinze
Feb 03 2015 09:00
@Big-Shark agree, $app->memory should be used
will be refactored with Redis/RedisLite
Maxim
@Big-Shark
Feb 03 2015 11:35

@aheinze

object(Lime\Response)#224 (7) { ["body"]=> bool(false) ["status"]=> int(200) ["mime"]=> string(4) "html" ["gzip"]=> bool(false) ["nocache"]=> bool(false) ["etag"]=> bool(false) ["headers"]=> array(0) { } }

This is correct Response?

Maxim
@Big-Shark
Feb 03 2015 16:12
@JulienTant I was able to get laravel work with cockpit, but this is not simple
@JulienTant @aheinze Constants were the biggest problem. I think to use the constants are not the best variant