Skip to content

Commit

Permalink
Fix deprecated _initializeSchema
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskd committed Jun 25, 2024
1 parent 495589f commit 6f6b4b6
Showing 1 changed file with 6 additions and 19 deletions.
25 changes: 6 additions & 19 deletions src/Model/Table/SocialProfilesTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,22 @@

namespace ADmad\SocialAuth\Model\Table;

use Cake\Database\Schema\TableSchemaInterface;
use Cake\ORM\Table;

/**
* @method \ADmad\SocialAuth\Model\Entity\SocialProfile newEmptyEntity()
* @method \ADmad\SocialAuth\Model\Entity\SocialProfile newEntity(array $data, array $options = [])
* @method \ADmad\SocialAuth\Model\Entity\SocialProfile[] newEntities(array $data, array $options = [])
* @method \ADmad\SocialAuth\Model\Entity\SocialProfile get($primaryKey, $options = [])
* @method \ADmad\SocialAuth\Model\Entity\SocialProfile get(mixed $primaryKey, array|string $finder = 'all', \Psr\SimpleCache\CacheInterface|string|null $cache = null, \Closure|string|null $cacheKey = null, mixed ...$args)
* @method \ADmad\SocialAuth\Model\Entity\SocialProfile findOrCreate($search, ?callable $callback = null, $options = [])
* @method \ADmad\SocialAuth\Model\Entity\SocialProfile patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
* @method \ADmad\SocialAuth\Model\Entity\SocialProfile[] patchEntities(iterable $entities, array $data, array $options = [])
* @method \ADmad\SocialAuth\Model\Entity\SocialProfile|false save(\Cake\Datasource\EntityInterface $entity, $options = [])
* @method \ADmad\SocialAuth\Model\Entity\SocialProfile saveOrFail(\Cake\Datasource\EntityInterface $entity, $options = [])
* @method \ADmad\SocialAuth\Model\Entity\SocialProfile[]|\Cake\Datasource\ResultSetInterface|false saveMany(iterable $entities, $options = [])
* @method \ADmad\SocialAuth\Model\Entity\SocialProfile[]|\Cake\Datasource\ResultSetInterface saveManyOrFail(iterable $entities, $options = [])
* @method \ADmad\SocialAuth\Model\Entity\SocialProfile[]|\Cake\Datasource\ResultSetInterface|false deleteMany(iterable $entities, $options = [])
* @method \ADmad\SocialAuth\Model\Entity\SocialProfile[]|\Cake\Datasource\ResultSetInterface deleteManyOrFail(iterable $entities, $options = [])
* @method \ADmad\SocialAuth\Model\Entity\SocialProfile[]|false saveMany(iterable $entities, $options = [])
* @method \ADmad\SocialAuth\Model\Entity\SocialProfile[] saveManyOrFail(iterable $entities, $options = [])
* @method \ADmad\SocialAuth\Model\Entity\SocialProfile[]|false deleteMany(iterable $entities, $options = [])
* @method \ADmad\SocialAuth\Model\Entity\SocialProfile[] deleteManyOrFail(iterable $entities, $options = [])
* @mixin \Cake\ORM\Behavior\TimestampBehavior
*/
class SocialProfilesTable extends Table
Expand All @@ -42,18 +41,6 @@ public function initialize(array $config): void
parent::initialize($config);

$this->addBehavior('Timestamp');
}

/**
* Set custom type of "access_token" column.
*
* @param \Cake\Database\Schema\TableSchemaInterface $schema The table definition fetched from database.
* @return \Cake\Database\Schema\TableSchemaInterface
*/
protected function _initializeSchema(TableSchemaInterface $schema): TableSchemaInterface
{
$schema->setColumnType('access_token', 'social-auth.serialized');

return $schema;
$this->getSchema()->setColumnType('access_token', 'social-auth.serialized');
}
}

0 comments on commit 6f6b4b6

Please sign in to comment.