How to use custom extension till final devlopment in project

I have created one extension in vendor directory with proper directory structure. I have been trying to use that extension in my application, it gives error of class not found.

I tried by adding entry in composer.json file and used below command in console

composer update @vendor/package/projectname

It returns following error for updating composer.

The requested package package/projectname could not be found in any version, there may be a typo in the package name.

I do not want to push extension on github until it is ready to use and till development I want to use that extension in my application. So Please provide possible solution

Just version control your extension with git (or mercurial, svn), and specify its repository as a source. The repository can be a local one (no need to use GitHub). Or you may use a private repository of GitHub or BitBucket.

Please look at the Composer doc.

https://getcomposer.org/doc/05-repositories.md#vcs

You can also just simply use a path:




 "repositories": [

    	{        	

        	"type": "path",

 			"url": "../../packages/my-package"

 		}

],