<commit_before>UPGRADE FROM 2.x to 3.0
=======================

### ClassLoader

 * The `UniversalClassLoader` class has been removed in favor of
   `ClassLoader`. The only difference is that some method names are different:

   | Old name | New name
   | -------- | ---
   | `registerNamespaces()` | `addPrefixes()`
   | `registerPrefixes()` | `addPrefixes()`
   | `registerNamespace()` | `addPrefix()`
   | `registerPrefix()` | `addPrefix()`
   | `getNamespaces()` | `getPrefixes()`
   | `getNamespaceFallbacks()` | `getFallbackDirs()`
   | `getPrefixFallbacks()` | `getFallbackDirs()`

 * The `DebugUniversalClassLoader` class has been removed in favor of
   `DebugClassLoader`. The difference is that the constructor now takes a
   loader to wrap.


### Config

 * The `__toString()` method of the `\Symfony\Component\Config\ConfigCache` class
   was removed in favor of the new `getPath()` method.

### Console

 * The `dialog` helper has been removed in favor of the `question` helper.

 * The methods `isQuiet`, `isVerbose`, `isVeryVerbose` and `isDebug` were added
   to `Symfony\Component\Console\Output\OutputInterface`.

 * `ProgressHelper` has been removed in favor of `ProgressBar`.

   Before:

   ```php
   $h = new ProgressHelper();
   $h->start($output, 10);
   for ($i = 1; $i < 5; $i++) {
       usleep(200000);
       $h->advance();
   }
   $h->finish();
   ```

   After:

   ```php
   $bar = new ProgressBar($output, 10);
   $bar->start();
   for ($i = 1; $i < 5; $i++) {
       usleep(200000);
       $bar->advance();
   }
   ```

 * `TableHelper` has been removed in favor of `Table`.

   Before:

   ```php
   $table = $app->getHelperSet()->get('table');
   $table
       ->setHeaders(array('ISBN', 'Title', 'Author'))
       ->setRows(array(
           array('99921-58-10-7', 'Divine Comedy', '<NAME>'),
           array('9971-5-0210-0', 'A Tale of Two Cities', '<NAME>'),
           array('960-425-059-0', 'The Lord of the Rings', '<NAME>'),
           array('80-902734-1-6', 'And Then There Were None', '<NAME>'),
       ))
   ;
   $table->render($output);
   ```

   After:

   ```php
   use Symfony\Component\Console\Helper\Table;

   $table = new Table($output);
   $table
       ->setHeaders(array('ISBN', 'Title', 'Author'))
       ->setRows(array(
           array('99921-58-10-7', 'Divine Comedy', '<NAME>'),
           array('9971-5-0210-0', 'A Tale of Two Cities', '<NAME>'),
           array('960-425-059-0', 'The Lord of the Rings', '<NAME>'),
           array('80-902734-1-6', 'And Then There Were None', '<NAME>'),
       ))
   ;
   $table->render();
   ```

### DependencyInjection

 * The methods `Definition::setFactoryClass()`,
   `Definition::setFactoryMethod()`, and `Definition::setFactoryService()` have
   been removed in favor of `Definition::setFactory()`. Services defined using
   YAML or XML use the same syntax as configurators.

 * Synchronized services are deprecated and the following methods have been
   removed: `ContainerBuilder::synchronize()`, `Definition::isSynchronized()`,
   and `Definition::setSynchronized()`.

### DoctrineBridge

 * The `property` option of `DoctrineType` was removed in favor of the `choice_label` option.

 * The `loader` option of `DoctrineType` was removed. You now have to override the `getLoader()`
   method in your custom type.

 * The `Symfony\Bridge\Doctrine\Form\ChoiceList\EntityChoiceList` was removed in favor
   of `Symfony\Bridge\Doctrine\Form\ChoiceList\DoctrineChoiceLoader`.

 * Passing a query builder closure to `ORMQueryBuilderLoader` is not supported anymore.
   You should pass resolved query builders only.

   Consequently, the arguments `$manager` and `$class` of `ORMQueryBuilderLoader`
   have been removed as well.

   Note that the `query_builder` option of `DoctrineType` *does* support
   closures, but the closure is now resolved in the type instead of in the
   loader.

### EventDispatcher

 * The interface `Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface`
   extends `Symfony\Component\EventDispatcher\EventDispatcherInterface`.

### Form

 *  The `ChoiceToBooleanArrayTransformer`, `ChoicesToBooleanArrayTransformer`,
    `FixRadioInputListener`, and `FixCheckboxInputListener` classes were removed.

 * The `choice_list` option of `ChoiceType` was removed.<commit_msg>minor #18772 Update UPGRADE FROM 2.x to 3.0 (bradbyu)<commit_after>UPGRADE FROM 2.x to 3.0
=======================

### ClassLoader

 * The `UniversalClassLoader` class has been removed in favor of
   `ClassLoader`. The only difference is that some method names are different:

   | Old name | New name
   | -------- | ---
   | `registerNamespaces()` | `addPrefixes()`
   | `registerPrefixes()` | `addPrefixes()`
   | `registerNamespace()` | `addPrefix()`
   | `registerPrefix()` | `addPrefix()`
   | `getNamespaces()` | `getPrefixes()`
   | `getNamespaceFallbacks()` | `getFallbackDirs()`
   | `getPrefixFallbacks()` | `getFallbackDirs()`

 * The `DebugUniversalClassLoader` class has been removed in favor of
   `DebugClassLoader`. The difference is that the constructor now takes a
   loader to wrap.


### Config

 * The `__toString()` method of the `\Symfony\Component\Config\ConfigCache` class
   was removed in favor of the new `getPath()` method.

### Console

 * The `dialog` helper has been removed in favor of the `question` helper.

 * The methods `isQuiet`, `isVerbose`, `isVeryVerbose` and `isDebug` were added
   to `Symfony\Component\Console\Output\OutputInterface`.

 * `ProgressHelper` has been removed in favor of `ProgressBar`.

   Before:

   ```php
   $h = new ProgressHelper();
   $h->start($output, 10);
   for ($i = 1; $i < 5; $i++) {
       usleep(200000);
       $h->advance();
   }
   $h->finish();
   ```

   After:

   ```php
   $bar = new ProgressBar($output, 10);
   $bar->start();
   for ($i = 1; $i < 5; $i++) {
       usleep(200000);
       $bar->advance();
   }
   ```

 * `TableHelper` has been removed in favor of `Table`.

   Before:

   ```php
   $table = $app->getHelperSet()->get('table');
   $table
       ->setHeaders(array('ISBN', 'Title', 'Author'))
       ->setRows(array(
           array('99921-58-10-7', 'Divine Comedy', '<NAME>'),
           array('9971-5-0210-0', 'A Tale of Two Cities', '<NAME>'),
           array('960-425-059-0', 'The Lord of the Rings', '<NAME>'),
           array('80-902734-1-6', 'And Then There Were None', '<NAME>'),
       ))
   ;
   $table->render($output);
   ```

   After:

   ```php
   use Symfony\Component\Console\Helper\Table;

   $table = new Table($output);
   $table
       ->setHeaders(array('ISBN', 'Title', 'Author'))
       ->setRows(array(
           array('99921-58-10-7', 'Divine Comedy', '<NAME>'),
           array('9971-5-0210-0', 'A Tale of Two Cities', '<NAME>'),
           array('960-425-059-0', 'The Lord of the Rings', '<NAME>'),
           array('80-902734-1-6', 'And Then There Were None', '<NAME>'),
       ))
   ;
   $table->render();
   ```

### DependencyInjection

 * The methods `Definition::setFactoryClass()`,
   `Definition::setFactoryMethod()`, and `Definition::setFactoryService()` have
   been removed in favor of `Definition::setFactory()`. Services defined using
   YAML or XML use the same syntax as configurators.

 * Synchronized services are deprecated and the following methods have been
   removed: `ContainerBuilder::synchronize()`, `Definition::isSynchronized()`,
   and `Definition::setSynchronized()`.

### DoctrineBridge

 * The `property` option of `DoctrineType` was removed in favor of the `choice_label` option.

 * The `loader` option of `DoctrineType` was removed. You now have to override the `getLoader()`
   method in your custom type.

 * The `Symfony\Bridge\Doctrine\Form\ChoiceList\EntityChoiceList` was removed in favor
   of `Symfony\Bridge\Doctrine\Form\ChoiceList\DoctrineChoiceLoader`.

 * Passing a query builder closure to `ORMQueryBuilderLoader` is not supported anymore.
   You should pass resolved query builders only.

   Consequently, the arguments `$manager` and `$class` of `ORMQueryBuilderLoader`
   have been removed as well.

   Note that the `query_builder` option of `DoctrineType` *does* support
   closures, but the closure is now resolved in the type instead of in the
   loader.

### EventDispatcher

 * The interface `Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface`
   extends `Symfony\Component\EventDispatcher\EventDispatcherInterface`.

### Form

 * The `max_length` option was removed. Use the `attr` option instead by setting it to
   an `array` with a `maxlength` key.

 * The `ChoiceToBooleanArrayTransformer`, `ChoicesToBooleanArrayTransformer`,
    `FixRadioInputListener`, and `FixCheckboxInputListener` classes were removed.

 * The `choice_list` option of `ChoiceType` was removed.
{'fraction_non_alphanumeric': 0.15072069004653274, 'fraction_numerical': 0.02428782204063103, 'mean_word_length': 3.59436913451512, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 45, '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': '2075098', 'n_tokens_mistral': 2863, 'n_tokens_neox': 2593, 'n_words': 801}