2
votes

I am having the issue with:

/bla.php - Class 'Propel\Runtime\Propel' not found in /.../model/conf/config.php on line 2

The contents of bla.php where it might choke on:

bla.php

require_once '/usr/share/php/propel/Propel.php'; 
Propel::init("model/conf/config.php");  

config.php (was automatically generated from convert-conf, based on schema.xml)

<?php
$serviceContainer = \Propel\Runtime\Propel::getServiceContainer();
$serviceContainer->checkVersion('2.0.0-dev');
$serviceContainer->setDefaultDatasource('default');

updated the autoload through composer

{
    "require": {
        "propel/propel": "2.0.0-alpha2"
    },
    "autoload": { 
      "classmap": ["model/classes/"] 
    }  
}

classes folder consists of

Folder: Base, Map
PHP: Apptable.php, ApptableQuery.php

If any other info is needed I'll provide it. I hope people know what to do.

1

1 Answers

1
votes

Since you are using composer it will you should use the autoload feature by inserting

require_once '/path/to/your/vendor/autoload.php/file';

Then you could just reference the Propel class like so

use Propel\Runtime\Propel;

I hope this helps solve your problem.