<commit_before><?php

if (ini_get('zend.ze1_compatibility_mode'))
{
  die("symfony cannot run with zend.ze1_compatibility_mode enabled.\nPlease turn zend.ze1_compatibility_mode to Off in your php.ini.\n");
}

// define some PEAR directory constants
$pear_lib_dir = '@PEAR-DIR@';
$pear_data_dir = '@DATA-DIR@';
define('PAKEFILE_SYMLINK',  false);
define('SYMFONY_VERSION',   '@SYMFONY-VERSION@');

if (is_readable('lib/symfony'))
{
  define('PAKEFILE_LIB_DIR',  'lib/symfony');
  define('PAKEFILE_DATA_DIR', 'data/symfony');
}
else
{
  define('PAKEFILE_LIB_DIR',  '@PEAR-DIR@/symfony');
  define('PAKEFILE_DATA_DIR', '@DATA-DIR@/symfony');
}

set_include_path(PAKEFILE_LIB_DIR.'/vendor'.PATH_SEPARATOR.get_include_path());
$pakefile = PAKEFILE_DATA_DIR.'/bin/pakefile.php';

include_once('pake/pakeFunction.php');

// we trap -V before pake
require_once 'pake/pakeGetopt.class.php';
$OPTIONS = array(
  array('--version', '-V', pakeGetopt::NO_ARGUMENT, ''),
  array('--pakefile', '-f', pakeGetopt::OPTIONAL_ARGUMENT, ''),
  array('--tasks', '-T', pakeGetopt::OPTIONAL_ARGUMENT, ''),
);
$opt = new pakeGetopt($OPTIONS);
try
{
  $opt->parse();

  foreach ($opt->get_options() as $opt => $value)
  {
    if ($opt == 'version')
    {
      echo 'symfony version '.SYMFONY_VERSION."\n";
      exit(0);
    }
  }
}
catch (pakeException $e)
{
  print $e->getMessage();
}

$pake = pakeApp::get_instance();
try
{
  $pake->run($pakefile);
}
catch (Exception $e)
{
  echo "ERROR: symfony - ".$e->getMessage()."\n";
}<commit_msg>updated symfony.php command line tool to take advantage of the new pake tool<commit_after><?php

if (ini_get('zend.ze1_compatibility_mode'))
{
  die("symfony cannot run with zend.ze1_compatibility_mode enabled.\nPlease turn zend.ze1_compatibility_mode to Off in your php.ini.\n");
}

// define some PEAR directory constants
$pear_lib_dir = '@PEAR-DIR@';
$pear_data_dir = '@DATA-DIR@';
define('PAKEFILE_SYMLINK',  false);
define('SYMFONY_VERSION',   '@SYMFONY-VERSION@');

if (is_readable('lib/symfony'))
{
  define('PAKEFILE_LIB_DIR',  'lib/symfony');
  define('PAKEFILE_DATA_DIR', 'data/symfony');
}
elseif (is_readable($pear_lib_dir))
{
  define('PAKEFILE_LIB_DIR',  '@PEAR-DIR@/symfony');
  define('PAKEFILE_DATA_DIR', '@DATA-DIR@/symfony');
}
else
{
  define('PAKEFILE_LIB_DIR',  realpath(dirname(__FILE__).'/../../lib'));
  define('PAKEFILE_DATA_DIR', realpath(dirname(__FILE__).'/..'));
}

set_include_path(PAKEFILE_LIB_DIR.'/vendor'.PATH_SEPARATOR.get_include_path());
$pakefile = PAKEFILE_DATA_DIR.'/bin/pakefile.php';

include_once('pake/pakeFunction.php');

// we trap -V before pake
require_once 'pake/pakeGetopt.class.php';
$OPTIONS = array(
  array('--version', '-V', pakeGetopt::NO_ARGUMENT, ''),
  array('--pakefile', '-f', pakeGetopt::OPTIONAL_ARGUMENT, ''),
  array('--tasks', '-T', pakeGetopt::OPTIONAL_ARGUMENT, ''),
);
$opt = new pakeGetopt($OPTIONS);
try
{
  $opt->parse();

  foreach ($opt->get_options() as $opt => $value)
  {
    if ($opt == 'version')
    {
      echo 'symfony version '.SYMFONY_VERSION."\n";
      exit(0);
    }
  }
}
catch (pakeException $e)
{
}

$pake = pakeApp::get_instance();
$pake->run($pakefile);
{'fraction_non_alphanumeric': 0.19475181789440404, 'fraction_numerical': 0.002529244388239014, 'mean_word_length': 5.131782945736434, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1416577', 'n_tokens_mistral': 1247, 'n_tokens_neox': 1249, 'n_words': 202}