facebook-php-business-sdk icon indicating copy to clipboard operation
facebook-php-business-sdk copied to clipboard

Removed @deprecated tag on AbstractCrudObject::_construct (or retire deprecated functionality)

Open DeveloperRob opened this issue 6 months ago • 0 comments

Good Morning,

The definition of \FacebookAds\Object\AbstractCrudObjects` is:

  /**
   * @deprecated deprecate constructor with null and parent_id
   * @param string $id Optional (do not set for new objects)
   * @param string $parent_id Optional, needed for creating new objects.
   * @param Api $api The Api instance this object should use to make calls
   */
  public function __construct($id = null, $parent_id = null, ?Api $api = null) {

However the @deprecated tag isn't correct (based on PHPDocumentor, PEAR, phpstan & phan) - the entire function isn't deprecated, just a particular usage of it (although unfortunately I am not sure you can easily comment to SA tools the deprecation).

We currently need to stub out the class so that our SA tools don't produce false positives on the deprecation. As such, would it be possible to either remove the @deprecated tag from the function - or given the deprecation was introduced 8 years ago, can the deprecated functionality be removed entirely?

Thanks, Robert

DeveloperRob avatar Oct 30 '25 12:10 DeveloperRob